| Summary: | SDL_image cannot load monochrome or greyscale 8-bit PNG files | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | pelya <x.pelya.x> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | quaker66, rhamph+libsdl |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
2-color grayscale PNG
8-bit greyscale bug 1503 fix |
||
Created attachment 861 [details]
8-bit greyscale
Here's an 8-bit greyscale that SDL_image also fails to load (reports "Out of memory").
SDL1.3 trunk of a few weeks ago, SDL_image trunk of today.
I poked around and SDL_MasksToPixelFormatEnum only supports INDEX8 and RGB332, which isn't what IMG_LoadPNG_RW is asking for. I'm not sure what the solution is here. I don't see any greyscale formats listed in SDL_PIXELFORMAT_*. Maybe the easiest is to pretend it's 8-bit indexed but with a no-op palette that can be ignored? Created attachment 1058 [details] bug 1503 fix Hello, just attaching a fix here (by Lee "eihrul" Salzman) to make it noticed :) DK |
Created attachment 860 [details] 2-color grayscale PNG Branch default, rev. 330:1230766039be SDL_image will fail when trying to load the PNG file I've attached, it's in 2-color grayscale format. I remember opening a very similar bug a while ago.