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

IMG_Load() refuses to load valid ILBM image files #143

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

IMG_Load() refuses to load valid ILBM image files #143

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

SDLBugzilla commented Feb 11, 2021

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.4
Reported for operating system, platform: All, All

Comments on the original bug report:

On 2019-01-16 20:32:44 +0000, Holger Schemel wrote:

Created attachment 3577
Minimal test program with ILBM test images to reproduce the bug.

Summary: IMG_Load() only loads ILBM image files with 1, 4, 8 or 24 bit planes.

How to reproduce the problem: Trying to load a valid ILBM image file with 2, 3, 5 or 6 bit planes fails with error message "unsupported number of color planes".

Expected behaviour: IMG_Load() loads all valid ILBM image files with various number of bitplanes.

Observed behaviour: IMG_Load() only loads a small subset of valid ILBM files.

SDL2_image 2.0.3 and 2.0.4 cannot load ILBM images with a "usual" (and totally valid) number of bitplanes as used on the Amiga anymore, that is, ILBM files with up to 5 bitplanes (32 colors) or 6 bitplanes (64 colors; EHB mode).

The following commit introduced the problem: http://hg.libsdl.org/SDL_image/rev/97f7f01e0665

The commit message says “lbm: Fail to load images with unsupported/bogus color depth”, and the patch (apparently arbitrarily) limits loading ILBM files to those with either 1, 4, 8 or 24 bitplanes, which prevents typical ILBM files from the Amiga from being loaded.

The attached minimal test program and test ILBM files (newly created on an Amiga with Deluxe Paint IV today) shows the problem. Just extract and type "make". (The test program only loads the ILBM files, but does not display them.)

This bug can easily be fixed by simply reverting the above commit.

On 2019-01-16 20:45:51 +0000, Holger Schemel wrote:

Maybe it should be noted that loading (and displaying) all these ILBM test files works just fine with previous versions of SDL_image (up to version 2.0.2).

On 2019-06-10 23:31:19 +0000, Sam Lantinga wrote:

Fixed, thanks!
https://hg.libsdl.org/SDL_image/rev/b9f71b5a12ba

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

1 participant