raylib-python-cffi icon indicating copy to clipboard operation
raylib-python-cffi copied to clipboard

jpg image loading support

Open sDos280 opened this issue 3 years ago • 8 comments
trafficstars

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

image

sDos280 avatar Sep 23 '22 13:09 sDos280

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

sDos280 avatar Sep 23 '22 13:09 sDos280

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.

electronstudio avatar Sep 23 '22 14:09 electronstudio

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...

sDos280 avatar Sep 23 '22 14:09 sDos280

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.

electronstudio avatar Sep 23 '22 15:09 electronstudio

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

sDos280 avatar Sep 23 '22 16:09 sDos280

I'd rather get jpg support working.

electronstudio avatar Sep 23 '22 16:09 electronstudio

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

sDos280 avatar Sep 23 '22 16:09 sDos280

no that's ok

electronstudio avatar Sep 23 '22 18:09 electronstudio

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

electronstudio avatar Dec 19 '23 00:12 electronstudio

should be fixed when i release 5.0.0.1

electronstudio avatar Dec 22 '23 03:12 electronstudio