Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jpg not supported #169

Open
jptrzy opened this issue Sep 15, 2023 · 4 comments
Open

jpg not supported #169

jptrzy opened this issue Sep 15, 2023 · 4 comments

Comments

@jptrzy
Copy link

jptrzy commented Sep 15, 2023

While I create Image or Texture2D using jpg it allays write

INFO: FILEIO: [**] File loaded successfully
WARNING: IMAGE: File format not supported
WARNING: IMAGE: [***] Failed to load data

Png files work normally.

Maybe their is an option to enable that I'm missing?
Thou I couldn't find any information about it.

Are their any system libraries for it to work?

System

os: Linux - Nixos
rustc: 1.72.0

Cargo.toml:

raylib = "3.7.0"

@Danrejk
Copy link

Danrejk commented Oct 12, 2023

I have been trying to find a way to add .jpg support as well. Apparently there used to be support for .jpg, then it was added back, but now it doesn't work? I'm not all too sure.

I hope someone knows the answer, because .jpg support would come in very handy for my program.

@jestarray
Copy link
Contributor

jpg is supported by raylib however it is not enabled by default and there's no configuration on exposing it atm so you will need to edit the bindings manually:
https://github.com/deltaphc/raylib-rs/blob/master/raylib-sys/build.rs#L61
add:

.define("SUPPORT_FILEFORMAT_JPG", "ON")

@uzervlad
Copy link

The SUPPORT_FILEFORMAT_JPG flag was added in 5.0, however JPEGs still fail to load.

@jestarray
Copy link
Contributor

maybe the flag name changed or something? @IoIxD can you check if you can load jpeg?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants