SDL_Image

I compiled the image lib in Win32 with VC6.0. But when I try to run Aliens or
show I receive the same type of error:
Couldn’t load image data/player.gif: Unsupported image format

What did I do wrong when I compiled the image lib?

Bryan

Banzai!

I am having trouble with some transparent images and SDL_image.

Most of the transparent images that I try to load are a little bit ‘more
transparent’ that I’d like them to be. There are multiple colors that are
transparent, most of them are partially transparent.

I checked images with multiple programs and they are alright and transparent
where they should be. But if I load them with IMG_Load() and blit them on
screen they are somehow screwed up. I tried with png, tga, gif formats and
they were all broken.

Anyone had similar problems or has any idea about what could be wrong?

Thanks,
David!---------------
NATO Air! – Just Do It!

Most of the transparent images that I try to load are a little bit ‘more
transparent’ that I’d like them to be. There are multiple colors that are
transparent, most of them are partially transparent.

Please tell us more exactly what you mean by “more transparent”. Some code
would also help, and a sample image. Does showimage work?

I checked images with multiple programs and they are alright and transparent
where they should be. But if I load them with IMG_Load() and blit them on
screen they are somehow screwed up. I tried with png, tga, gif formats and
they were all broken.

GIF doesn’t support partial transparency at all

Is there a port of the SDL_Image library to MacOS X, or can I compile
one?

-Randall

I noticed that on the SDL_Image page there is no support for MacOS X.
I also noticed that in the CVS files there is a PBProjects file. I took
this
and I took the SDL_Image source distribution.

I compiled the static library fine. But when I run it as part of my
project
it fails to load image files. I ran it through the debugger and found
that
there is a “dummy” image loading function for every real one that just
returns NULL and exits. I assume this function serves some purpose
but I also assume that it shouldn’t be the function that gets called when
I’m supposed to be loading my image.

If I comment out the dummy functions the library fails to work at all in
my
project.

I desperately need to get this working.

Any help would be appreciated,
-Randall

At 21:12 18.11.2001 -0500 Randall Leeds wrote

I noticed that on the SDL_Image page there is no support for MacOS X.
I also noticed that in the CVS files there is a PBProjects file. I took this
and I took the SDL_Image source distribution.

I compiled the static library fine. But when I run it as part of my project
it fails to load image files. I ran it through the debugger and found that
there is a “dummy” image loading function for every real one that just
returns NULL and exits. I assume this function serves some purpose
but I also assume that it shouldn’t be the function that gets called when
I’m supposed to be loading my image.

Usually dummy functions are used when the interface is already designed
but the function itself not.
This way you could already write your code like it should be,
when the functionality is implemented.
In the moment the functions are implemented, the code
does not need to be changed ( well. thats the way it is supposed to work :slight_smile: ).

Maybe this is the reason why this function does nothing.

greets :slight_smile:

Matthias

I noticed that on the SDL_Image page there is no support for MacOS X.
I also noticed that in the CVS files there is a PBProjects file. I took
this
and I took the SDL_Image source distribution.

We’re in the process of working on this.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

I’m in a bit of a pickle… Recently I wrote a little prog that packages up
all my files into one big file. The game then goes into this file, extract
the data, writes it to disk and then it is loaded.

Everything is fine, except SDL_image. It seems to stop working correctly
after a while. C structures that contain pointers to images go horrible
wrong and it made me wonder if it is because the extracted file has no
extension. It is simply extracted as “tempfile”.

Are image types determined by extension or content?

There doesn’t appear to be anything wrong with my unpacking code as all the
files are extracted correctly.

Any ideas?

An embedded and charset-unspecified text was scrubbed…
Name: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20021118/a092d9c0/attachment.txt

Unfortunately not. Currently in my development version I have a mixture of
BMPs, PNGs and JPEGs. I guess if they were all the same file type then I’d
be safer?> -----Original Message-----

From: patrick at 2dgame-tutorial.com [SMTP:patrick at 2dgame-tutorial.com]
Sent: Monday, November 18, 2002 10:58 AM
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_Image

Hi,

it is determined by extension. I guess you use only on image type, so that
shouldn’t be a big
problem…? Read more about SDL_image requirements here:

http://jcatki.no-ip.org/SDL_image/

Patrick.

Sweeney, Steven (FNB) SweeneS at fnb.co.uk schreef:

I’m in a bit of a pickle… Recently I wrote a little prog that packages
up
all my files into one big file. The game then goes into this file,
extract
the data, writes it to disk and then it is loaded.

Everything is fine, except SDL_image. It seems to stop working correctly
after a while. C structures that contain pointers to images go horrible
wrong and it made me wonder if it is because the extracted file has no
extension. It is simply extracted as “tempfile”.

Are image types determined by extension or content?

There doesn’t appear to be anything wrong with my unpacking code as all
the
files are extracted correctly.

Any ideas?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

.sophos.3.61.11.15.

An embedded and charset-unspecified text was scrubbed…
Name: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20021118/1f29d564/attachment.asc

I’ve made a modification to make it extract the file and give the temporary
file a specified extension… makes removing them easier at the end of the
prog. I’ll let you know if I’m successful.

Cheers, thanks for the help :slight_smile:

Steve :)> -----Original Message-----

From: patrick at 2dgame-tutorial.com [SMTP:patrick at 2dgame-tutorial.com]
Sent: Monday, November 18, 2002 12:03 PM
To: sdl at libsdl.org
Subject: RE: [SDL] SDL_Image

To be able to read from a big file, you do have some meta-header I think?
Maybe you could add
the filename to it, so you extract it to the original names, in stead of
“tempfile”. You only
need to modify your extract function, so that it returns (or by reference)
the filename it has
written…

Sweeney, Steven (FNB) SweeneS at fnb.co.uk schreef:

Unfortunately not. Currently in my development version I have a mixture
of
BMPs, PNGs and JPEGs. I guess if they were all the same file type then
I’d
be safer?

-----Original Message-----
From: patrick at 2dgame-tutorial.com
[SMTP:patrick at 2dgame-tutorial.com]

Sent: Monday, November 18, 2002 10:58 AM
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_Image

Hi,

it is determined by extension. I guess you use only on image type, so
that

shouldn’t be a big
problem…? Read more about SDL_image requirements here:

http://jcatki.no-ip.org/SDL_image/

Patrick.

Sweeney, Steven (FNB) SweeneS at fnb.co.uk schreef:

I’m in a bit of a pickle… Recently I wrote a little prog that
packages

up

all my files into one big file. The game then goes into this file,
extract
the data, writes it to disk and then it is loaded.

Everything is fine, except SDL_image. It seems to stop working
correctly

after a while. C structures that contain pointers to images go
horrible

wrong and it made me wonder if it is because the extracted file has no
extension. It is simply extracted as “tempfile”.

Are image types determined by extension or content?

There doesn’t appear to be anything wrong with my unpacking code as
all

the

files are extracted correctly.

Any ideas?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

.sophos.3.61.11.15.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Incase anyone is interested, I got this sorted.

It was infact my unpacking code that was causing the problem!

Thanks :)> -----Original Message-----

From: patrick at 2dgame-tutorial.com [SMTP:patrick at 2dgame-tutorial.com]
Sent: Monday, November 18, 2002 12:03 PM
To: sdl at libsdl.org
Subject: RE: [SDL] SDL_Image

To be able to read from a big file, you do have some meta-header I think?
Maybe you could add
the filename to it, so you extract it to the original names, in stead of
“tempfile”. You only
need to modify your extract function, so that it returns (or by reference)
the filename it has
written…

Sweeney, Steven (FNB) SweeneS at fnb.co.uk schreef:

Unfortunately not. Currently in my development version I have a mixture
of
BMPs, PNGs and JPEGs. I guess if they were all the same file type then
I’d
be safer?

-----Original Message-----
From: patrick at 2dgame-tutorial.com
[SMTP:patrick at 2dgame-tutorial.com]

Sent: Monday, November 18, 2002 10:58 AM
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_Image

Hi,

it is determined by extension. I guess you use only on image type, so
that

shouldn’t be a big
problem…? Read more about SDL_image requirements here:

http://jcatki.no-ip.org/SDL_image/

Patrick.

Sweeney, Steven (FNB) SweeneS at fnb.co.uk schreef:

I’m in a bit of a pickle… Recently I wrote a little prog that
packages

up

all my files into one big file. The game then goes into this file,
extract
the data, writes it to disk and then it is loaded.

Everything is fine, except SDL_image. It seems to stop working
correctly

after a while. C structures that contain pointers to images go
horrible

wrong and it made me wonder if it is because the extracted file has no
extension. It is simply extracted as “tempfile”.

Are image types determined by extension or content?

There doesn’t appear to be anything wrong with my unpacking code as
all

the

files are extracted correctly.

Any ideas?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

.sophos.3.61.11.15.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl