Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 4461 - IMG_Load() refuses to load valid ILBM image files
Holger Schemel 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.
- Loading branch information