PNG and transparency

I just downloaded the latest SDL_Image library. From what I could tell
before when PNG files loaded I had natural transparency preserved. In
other words I hadn’t had to cal SDL_SetColorKey at all in order to set
transparency for a PNG surface loaded through IMG_Load.

In the latest pieces of code I have been working with I have had to call
the colorkey function in order to get transparency back. I am wondering
if something got a little screwey in SDL_image.

No major problem though. It is just a sprite class I am working on that
will set the transparency for all file types loaded in. It works fine
with SDL_SetColorKey. I was just curious.

Also when will the configure script from the CVS go into the stable and
development distributions? That last question is the #1 question on this
list.

Dave

Never speak ill of yourself, your friends will always say enough on
that subject.
– Charles-Maurice De Talleyrand

I just downloaded the latest SDL_Image library. From what I could tell
before when PNG files loaded I had natural transparency preserved.

It was probably using alpha, not real transparency. I just updated the
image library to support transparent GIF images so that I don’t have to
explicitly set the colorkey for them. The alpha blend driver has been
updated so that it doesn’t perform blending on all opaque or all transparent
pixels, but it’s still faster to use a colorkey blit.

Also when will the configure script from the CVS go into the stable and
development distributions? That last question is the #1 question on this
list.

Very soon. Let me think… I can’t think of any serious reason not to
release SDL 1.1.3 any day now. I’m just waiting for the new YUV surface
and thread synchronization code to be fully exercised. I can’t get the
DirectDraw YUV code to actually create a YUV surface - I get “Invalid
pixel format” for some reason, even though the hardware supports the
FOURCC format I’m using. Any suggestions?

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

I just downloaded the latest SDL_Image library. From what I could tell
before when PNG files loaded I had natural transparency preserved.

It was probably using alpha, not real transparency. I just updated the

I think you are correct!!

image library to support transparent GIF images so that I don’t have to

Nice!

explicitly set the colorkey for them. The alpha blend driver has been
updated so that it doesn’t perform blending on all opaque or all transparent
pixels, but it’s still faster to use a colorkey blit.

I’ll keep that in mind…

Also when will the configure script from the CVS go into the stable and
development distributions? That last question is the #1 question on this
list.

Very soon. Let me think… I can’t think of any serious reason not to
release SDL 1.1.3 any day now. I’m just waiting for the new YUV surface
and thread synchronization code to be fully exercised. I can’t get the
DirectDraw YUV code to actually create a YUV surface - I get “Invalid
pixel format” for some reason, even though the hardware supports the
FOURCC format I’m using. Any suggestions?

When it comes to microsoft I am clueless as to how any of that stuff can
even work. Direct X 7.0 nearly did my machine in… (Not really I just
like to get error messages when things aren’t correct, Microsoft assumes
we are too dumb to understand or just wants us to be charged for customer
support)
Good luck to you with the YUV stuff (I am not even sure what YUV is!).

Oh yeah… When do you think I will see a link to DFont on the libraries
link on the SDL pages?
http://phoenix.lhup.edu/~dleimbac/Projects/DFont/

I’ve got a screenshot of several fonts being displayed with the testfont
program and a description on the page.

[No hurry! :slight_smile: ]

Dave> > See ya,

-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Sam Lantinga wrote:

Very soon. Let me think… I can’t think of any serious reason not to
release SDL 1.1.3 any day now.

I have posted a bugreport two days ago, the image is not at the correct
position in windowmode. I have attached it to the end.
With 1.1.2 it workes.

Proff–

Florian ‘Proff’ Schulze - @Florian_Schulze
Member: TeamTNT - http://www.teamtnt.com
Homepage: - http://proff.fly.to
ICQ#: - 40510245

Hi,

I have a problem with window output in SDL. I will try to explain it
with ASCII-Art:

SSSSSSSSSSSSSSSSSSS
SIIIIIIII S
SI I S
SI WWWWWWWWW S
SI W I W S
SIIIWIIII W S
S W W S
S WWWWWWWWW S
S S
SSSSSSSSSSSSSSSSSSS

S is the Screen, I is the Image of the Surface and W is the Window. As
you can see the Image is always in the upper-left corner of the Screen,
independend from where the Window is. Is this normal or is that a bug.
I’ve tried it with SDL 1.1.3. With an older 1.1.x version it worked. I
haven’t tried 1.0.x.

I have asked some time ago, is 1.1.x official yet or not?

Sam Lantinga wrote:

Very soon. Let me think… I can’t think of any serious reason not to
release SDL 1.1.3 any day now.

I have posted a bugreport two days ago, the image is not at the correct
position in windowmode. I have attached it to the end.
With 1.1.2 it workes.

Have you tried the latest SDL cvs snapshot? It should be fixed.

-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Ok,

I have just downloaded the latest CVS. The problem I mentioned is fixed,
but there is a new one :wink:
In the VisualC Project file sdl.dsp the sdl_sysmutex.c-file is called
sdl_mutex.c, so VisualC can’t find it. The sdl_syssem.c is missing in
sdl.dsp and in the function SDL_SemWait SDL_MUTEX_MAXTIMEOUT isn’t
declared, I think it should be SDL_MUTEX_TIMEDOUT.

Proff–

Florian ‘Proff’ Schulze - @Florian_Schulze
Member: TeamTNT - http://www.teamtnt.com
Homepage: - http://proff.fly.to
ICQ#: - 40510245

Ok,

I have just downloaded the latest CVS. The problem I mentioned is fixed,
but there is a new one :wink:
In the VisualC Project file sdl.dsp the sdl_sysmutex.c-file is called
sdl_mutex.c, so VisualC can’t find it. The sdl_syssem.c is missing in
sdl.dsp and in the function SDL_SemWait SDL_MUTEX_MAXTIMEOUT isn’t
declared, I think it should be SDL_MUTEX_TIMEDOUT.

This is fixed in the latest CVS, but hasn’t made it to the snapshot page
yet.

Thanks!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software