libsdl-org / SDL_image

Image decoding for many popular formats for Simple Directmedia Layer.
zlib License
572 stars 189 forks source link

WebP included with official Windows binaries but not macOS framework? #288

Closed a-hurst closed 2 years ago

a-hurst commented 2 years ago

Hi everyone,

Just testing out the new SDL2 releases with PySDL2 and noticed in the unit tests that WebP support has been removed from the official macOS release .framework. However, the changelog doesn't indicate that it was removed and the WebP .dll is still found in the "optional" folder for the Windows binaries. Was this a deliberate change or accidental?

Just wondering whether I should remove the unit test for WebP support on macOS or wait for a 2.6.1.

Also, sorry I didn't test this sooner before the official release! I've been busy with a new internship that eaten up a lot of my free time.

Best,

slouken commented 2 years ago

Can you try this? https://www.libsdl.org/tmp/SDL2_image.dmg

sezero commented 2 years ago

44 MB libjxl framework? Ew..

a-hurst commented 2 years ago

@sezero libjxl and libavif aren't bundled in the Windows binaries either (even in the "optional" folder) so I'm personally fine with leaving those bulkier formats out the Mac binaries. The key things for me are a) cross-platform parity in included codec support and b) codec support parity with the last release of image.

slouken commented 2 years ago

Okay, I pulled avif and jxl support from SDL_image DMG

sezero commented 2 years ago

AVIF: might be possible to butcher down to a decoder-only build to reduce size but it's not that big to begin with.

JXL: Don't know what to do with that monstrosity..

a-hurst commented 2 years ago

@slouken That works perfectly, thanks! My only note is that I'd add something to the README explaining where to put the optional frameworks, I had to download the previous Image release to figure out where to put them inside the main framework.

slouken commented 2 years ago

The optional frameworks go in the same location as the main SDL_image.framework. If they're installed system wide, this means the /Library/Frameworks directory. If they're installed in an application bundle they should go in the Frameworks directory in the application bundle. The playwave and playmus Xcode projects show how this is done with an Xcode project.

slouken commented 2 years ago

I have uploaded a shippable archive of SDL_image 2.6.0 with signed optional frameworks here: https://www.libsdl.org/tmp/SDL2_image-2.7.0.dmg

I'm not currently planning an interim release with these changes, but you can use this until the official 2.8.0 release.

a-hurst commented 2 years ago

Thanks a ton for this! Your efforts are very much appreciated.

slouken commented 2 years ago

You're welcome!

a-hurst commented 2 years ago

@slouken While trying to update pysdl2-dll to include the new SDL 2.24.1 release, I hit a 404 error when it tries to grab the custom DMGs you kindly provided here. Following it directly gives a "missing page" error. Would you be able to re-upload the binaries to the site so I can push the update without self-hosting?

slouken commented 2 years ago

It's back, thanks for the heads up!