[MacPorts] #38012: libsdl_image 1.2.12: fails to load some .png images
MacPorts
noreply at macports.org
Sun Feb 10 12:15:18 PST 2013
#38012: libsdl_image 1.2.12: fails to load some .png images
-----------------------------+--------------------------------
Reporter: michael.klein@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.1.3
Keywords: | Port: libsdl_image
-----------------------------+--------------------------------
Trying to run circuslinux on Leopard (PPC):
{{{
$ circuslinux
Error: I couldn't load a graphics file:
/opt/local/share/circuslinux/data/images/title/programming.png
The Simple DirectMedia error that occured was:
Unknown bits_per_pixel u
}}}
The error is returned from {{{IMG_Load}}} and can be reproduced with just
few lines of C:
{{{
#include <SDL_error.h>
#include <SDL_image.h>
#include <stdio.h>
int SDL_main(int argc, char *argv[])
{
char **p;
for (p = argv+1; *p; p++)
{
printf("%s -> %p, %s\n", *p, IMG_Load(*p), SDL_GetError());
SDL_ClearError();
}
return 0;
}
}}}
{{{
$ cc `pkg-config --cflags SDL_image` `pkg-config --libs SDL_image`
imgload.c -o imgload
}}}
Some images from circuslinux load ok, some don't:
{{{
$ ./imgload /opt/local/share/circuslinux/data/images/title/*
/opt/local/share/circuslinux/data/images/title/graphics.png -> 0x0,
Unknown bits_per_pixel u
/opt/local/share/circuslinux/data/images/title/light-off.png -> 0x250790,
/opt/local/share/circuslinux/data/images/title/light-on.png -> 0x250910,
/opt/local/share/circuslinux/data/images/title/music.png -> 0x0, Unknown
bits_per_pixel u
/opt/local/share/circuslinux/data/images/title/programming.png -> 0x0,
Unknown bits_per_pixel u
/opt/local/share/circuslinux/data/images/title/title-highlights.png ->
0x250800,
/opt/local/share/circuslinux/data/images/title/title.png -> 0x251630,
}}}
The "Unknown bits_per_pixel" error comes from IMG_ImageIO.m.
As a workaround I disabled ImageIO support in libsdl_image, all files load
ok now.
--
Ticket URL: <https://trac.macports.org/ticket/38012>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list