Alpha on PNG

I suppose SDL_SetAlpha doesn’t work for PNG images, as it hasn’t worked for me.
What are the alternatives?

I tried exporting the image to a JPEG but it doesn’t seem possible to
accomplish curved edges and shadows by using a colorkey in place of the PNG’s
alpha channel.

I think there might be an alpha channel option on a JPEG image, but I’m not
sure how to make such a JPEG. If this is possible, can anyone instruct me on
this in either Photoshop or Gimp?

Thanks!
Gary____________________________________________________
Start your day with Yahoo! - make it your home page

G B wrote:

I suppose SDL_SetAlpha doesn’t work for PNG images, as it hasn’t
worked for me.

SDL does not know anything about pngs, jpgs, … the only fileformat
supported nativly is bmp. what i think you mean is, that surfaces loaded
from pngs react on SDL_SetAlpha not the way you have expected.

so it comes down to: why does SDL_SetAlpha not set the per surface
alpha value on surfaces that have an alpha mask?

which is a FAQ. per pixel and per surface alpha does not work
simultaniously. SDL just does not support this.

I think there might be an alpha channel option on a JPEG image, but
I’m not sure how to make such a JPEG.

jpegs do not have an alpha channel.

b.t.w. to sdl, there is no difference what format your images where
stored on harddisk. SDL_Image loads the file and gives you a surface. it
just comes that some image formats can store an alpha channel and some
can’t.

clemens

I suppose SDL_SetAlpha doesn’t work for PNG images, as it hasn’t worked for me.
What are the alternatives?

No alternative. SDL_SetAlpha works for SDL_Surface(s).

Regards,
Thomas Omilian