Transparen image from PNG format

Hi all

I have a big problem with SDL_Image library, when i want to load a "png"
image into surface. In my game that surface need to by transparen
(additionally with transparent that image from e.g. Photoshop).You know what
wham i think about.
I speek in eglish a little ,but i hope you understand me. I’m from Poland
and in my counrty SDL is
a tabu. If anyone can help me ,please respond.

To get an image to become transparent you have to set the colorkey in SDL
for wich color in the image you want to be transparent. (If I’m not
misstaken… was a while ago I used SDL).

/ Daniel

(includesSDL-announce)"

Hi all

I have a big problem with SDL_Image library, when i want to load a “png”
image into surface. In my game that surface need to by transparen
(additionally with transparent that image from e.g. Photoshop).You know
what
wham i think about.
I speek in eglish a little ,but i hope you understand me. I’m from Poland
and in my counrty SDL is
a tabu. If anyone can help me ,please respond.


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

Mvh
Daniel Liljeberg>From: “Tomek” <tomek.cynacewicz at poczta.fm>

Reply-To: "A list for developers using the SDL library.
To: sdl at libsdl.org
Subject: [SDL] Transparen image from PNG format
Date: Wed, 13 Jul 2005 20:20:47 +0200
===============================
Daniel Liljeberg
Vaniljgatan 14
424 45 Angered
031-3308167 / 0708-809893
“Welcome To Yesterdays Future”

I have a big problem with SDL_Image library, when i want to load a “png”
image into surface. In my game that surface need to by transparen

Do you mean you have a png picture with alpha (transparency) on the picture
?
Then you simply load it into a surface with IMG_Load and then you can simply
blit it with SDL_BlitSurface or so, I don’t exactly remember the names.
It’s as simple as it.–

P.O.M.P.E.I. du 47-20

Hi all

I have a big problem with SDL_Image library, when i want to load a “png”
image into surface. In my game that surface need to by transparen
(additionally with transparent that image from e.g. Photoshop).You know
what
wham i think about.
I speek in eglish a little ,but i hope you understand me. I’m from Poland
and in my counrty SDL is
a tabu. If anyone can help me ,please respond.

I’m going to assume you mean per-pixel alpha and not colourkeyed
transparency.

If you can use the SDL_Image library
(http://www.libsdl.org/projects/SDL_image/) it has native support for
loading PNG files with per-pixel transparency.

Also, I understand the SDL from the cvs repository has a patch applied
that allows it to load 32bpp BMP files so you can get your per-pixel alpha
that way as well, which is helpful if you don’t have the ability to get
SDL_Image on the platform of your choice.

Not exactly. My image is on the screen a and transparent is only color from
PNG(alpha channel). Additionaly whole image (not only one color) must be
half-opaque. I read in archives but i don’t know did problem was resolved.

U?ytkownik “Damien Damien” <damien_ at hotmail.com> napisa? w wiadomo?ci
news:BAY20-F15DCA8157D02EC80FB263C9AD00 at phx.gbl…> To get an image to become transparent you have to set the colorkey in SDL

for wich color in the image you want to be transparent. (If I’m not
misstaken… was a while ago I used SDL).

/ Daniel

From: “Tomek” <@Tomek_Cynacewicz>
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: sdl at libsdl.org
Subject: [SDL] Transparen image from PNG format
Date: Wed, 13 Jul 2005 20:20:47 +0200

Hi all

I have a big problem with SDL_Image library, when i want to load a “png”
image into surface. In my game that surface need to by transparen
(additionally with transparent that image from e.g. Photoshop).You know
what
wham i think about.
I speek in eglish a little ,but i hope you understand me. I’m from Poland
and in my counrty SDL is
a tabu. If anyone can help me ,please respond.


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

Mvh
Daniel Liljeberg

Daniel Liljeberg
Vaniljgatan 14
424 45 Angered
031-3308167 / 0708-809893
“Welcome To Yesterdays Future”

Tomek wrote:

I speek in eglish a little ,but i hope you understand me. I’m from Poland
and in my counrty SDL is
a tabu. If anyone can help me ,please respond.

OMG, I’m also from Poland, and though I have noticed that SDL isn’t as popular as it is in other countries (at least, from my personal experiences), but I wouldn’t say that it’s “tabu”… LOL :slight_smile: that was a little, uhm, exagarrated :wink:

Koshmaar

Tomek wrote:

I speek in eglish a little ,but i hope you understand me. I’m
from Poland
and in my counrty SDL is
a tabu. If anyone can help me ,please respond.

OMG, I’m also from Poland, and though I have noticed that SDL
isn’t as popular as it is in other countries (at least, from my
personal experiences), but I wouldn’t say that it’s “tabu”… LOL
:slight_smile: that was a little, uhm, exagarrated :wink:

Koshmaar

for me too :wink:
pamshoid at poczta.onet.pl----------------------------------------------------
Zi?cia trzeba sobie wychowa?:
Bernie Mac i Ashton Kutcher w przebojowej komedii
“Zgadnij kto” - w kinach od 22 lipca.

Then maybe you can help me:)

pozdrawiam

U?ytkownik “Koshmaar” napisa? w wiadomo?ci
news:002301c5896f$6bf683a0$5120010a at Koshmaar…
Tomek wrote:

I speek in eglish a little ,but i hope you understand me. I’m from Poland
and in my counrty SDL is
a tabu. If anyone can help me ,please respond.

OMG, I’m also from Poland, and though I have noticed that SDL isn’t as
popular as it is in other countries (at least, from my personal
experiences), but I wouldn’t say that it’s “tabu”… LOL :slight_smile: that was a
little, uhm, exagarrated :wink:

Koshmaar

lol!

why is SDL taboo in your country?

what is the prefered methods of multimedia development?

totaly odd! :P> ----- Original Message -----

From: apator10@wp.pl (Stanislaw Morgun)
To:
Sent: Friday, July 15, 2005 1:17 PM
Subject: Re: [SDL] Transparen image from PNG format

Tomek wrote:

I speek in eglish a little ,but i hope you understand me. I’m
from Poland
and in my counrty SDL is
a tabu. If anyone can help me ,please respond.

OMG, I’m also from Poland, and though I have noticed that SDL
isn’t as popular as it is in other countries (at least, from my
personal experiences), but I wouldn’t say that it’s “tabu”… LOL
:slight_smile: that was a little, uhm, exagarrated :wink:

Koshmaar

for me too :wink:
pamshoid at poczta.onet.pl


Zi?cia trzeba sobie wychowa?:
Bernie Mac i Ashton Kutcher w przebojowej komedii
“Zgadnij kto” - w kinach od 22 lipca.

Wirtualna Polska - Wszystko co ważne - www.wp.pl


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

Alan Wolf wrote:

lol!

why is SDL taboo in your country?

what is the prefered methods of multimedia development?

totaly odd! :stuck_out_tongue:

Hmmm, I don’t know it either, but I’ll try to find out, by making poll on one forum… I’ll send here results after a few days.

Koshmaar

lol!

why is SDL taboo in your country?

what is the prefered methods of multimedia development?

totaly odd! :stuck_out_tongue:

Hmmm, I don’t know it either, but I’ll try to find out, by making poll on one forum… I’ll send here results after a few days.

Ok, so here they are, results of anonymous poll on one polish programming forum:

DirectX: 17 votes, 39%
SDL: 10 votes, 23%
WinAPI: 9 votes, 20%
Allegro: 2 votes, 4%
Other: 2 votes, 4%
I won’t tell you: 2 votes, 4%
GLUT: 1 vote, 2%
GLFW: 0 votes, 0%

There were 43 votes altogether. Results show that SDL definitely isn’t taboo in Poland :wink: though there are more popular libraries.

Koshmaar

Results of voting are really impressive. I was unaware probably.
Now,in my project everything is more complicated.
After installation of newer version DevCpp whole application (game) works
slowly.
I tried to change from: screen = SDL_SetVideoMode(RESX, RESY, DEPTH,
SDL_FULLSCREEN | SDL_SWSURFACE );
to: screen = SDL_SetVideoMode(RESX, RESY, DEPTH, SDL_FULLSCREEN |
SDL_HWSURFACE );

resx 1024
resy 768
depth 16

I tred also with difrent combinations of: SDL_HWPALETTE , SDL_DOUBLEBUF ,
SDL_ASYNCBLIT and also it does not work correctly. Simply everything is too
slow.

shokran