Opened 11 years ago

Closed 8 years ago

#38012 closed defect (fixed)

libsdl_image 1.2.12: fails to load some .png images on 10.5

Reported by: mklein-de (Michael Klein) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: leopard Cc:
Port: libsdl_image

Description

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.

Attachments (1)

libsdl_image-disable-ImageIO.diff (1.1 KB) - added by mklein-de (Michael Klein) 11 years ago.
add disable_imageio variant

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by mklein-de (Michael Klein)

add disable_imageio variant

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: jmr@… removed
Owner: changed from macports-tickets@… to jmr@…

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Variant names should not begin with words like "disable".

comment:3 Changed 11 years ago by jmroot (Joshua Root)

Is there an upstream bug report?

comment:4 in reply to:  3 Changed 11 years ago by mklein-de (Michael Klein)

Replying to jmr@…:

Is there an upstream bug report?

http://bugzilla.libsdl.org/show_bug.cgi?id=1721

comment:5 Changed 8 years ago by ttimo@…

duplicate of #37453

comment:6 Changed 8 years ago by jmroot (Joshua Root)

Keywords: leopard added
Resolution: fixed
Status: newclosed
Summary: libsdl_image 1.2.12: fails to load some .png imageslibsdl_image 1.2.12: fails to load some .png images on 10.5

I don't think this is a dupe. I confirmed in a VM that the fix for #37453 does not fix this problem. Also this one does not affect OS versions newer than 10.5 but #37453 does.

Disabled ImageIO on 10.5 in r148198.

Note: See TracTickets for help on using tickets.