electronstudio / raylib-python-cffi

Python CFFI bindings for Raylib
http://electronstudio.github.io/raylib-python-cffi
Eclipse Public License 2.0
152 stars 29 forks source link

jpg image loading support #89

Closed sDos280 closed 9 months ago

sDos280 commented 2 years ago

the image in the image loading example is not loading, is that only on my PC?

image

sDos280 commented 2 years ago

it seems like there is a problem with loading a .jpn file or with the raylib_logo.jpg. with image = LoadImage(b"resources/raylib_logo.png") line it seem to work perfectly image

electronstudio commented 2 years ago

The binaries I ship have jpeg support enabled. If you compiled your own binaries then it will depend on how you compiled Raylib. The default Raylib configuration does not enable jpeg.

sDos280 commented 2 years ago

I compiled it with the pip (I imported pyray with the pip command...). it seems like the binaries that you shipped(if we are talking about the binary that I get with the pip command) haven't support for jpeg. at least for me... May you add that the binary that we get with the pip command supports jpeg? if that is already the case there may be a problem with my binary...

electronstudio commented 2 years ago

Verified. The binary builds do not include jpeg support even though we specify the option to cmake. Raylib probably fucked up cmake again, or changed something without caring about backwards compatibility. I'll investigate, but if it is a bug in Raylib cmake they usually say "cmake support is user contributed, we will not fix it". Raylib is not a project known for its quality.

sDos280 commented 2 years ago

ok, for now, I send a PR with the fix to this problem(by just using the raylib_logo.png) with some other things... https://github.com/electronstudio/raylib-python-cffi/pull/86

electronstudio commented 2 years ago

I'd rather get jpg support working.

sDos280 commented 2 years ago

ok, so should I recommit/ remove https://github.com/electronstudio/raylib-python-cffi/pull/86/commits/8eb8a386fdf33ec908eeafcae83d2eed74bc7fd9?

electronstudio commented 2 years ago

no that's ok

electronstudio commented 9 months ago

I think the ugly way to do this is to hack raylib’s config.h before we build.

electronstudio commented 9 months ago

should be fixed when i release 5.0.0.1