Page 1 of 1

Transparent chroma key

PostPosted: Fri Jan 05, 2007 4:38 am
by GreenGame
The image that I'm using for a moving actor has a green chroma key background. Is there a way to use GE to make the chroma key transparent?

PostPosted: Fri Jan 05, 2007 11:05 am
by irblinx
What image format are you using?

My understanding of this is that for 24bit files GE uses the alpha transparency of the image, otherwise the colour of the top left corner pixel dictates the transparent colour of the image in GE.

PostPosted: Fri Jan 05, 2007 1:23 pm
by makslane
24bit files GE uses the alpha transparency of the image

For 32 bit files!

PostPosted: Fri Jan 05, 2007 10:16 pm
by Game A Gogo
24 bits is only 255x255x255 which is not 32bit 255x255x255x255 (the 3 firts 255 are the colors and the last one is the transparent)

PostPosted: Fri Jan 05, 2007 10:47 pm
by irblinx
makslane wrote:
24bit files GE uses the alpha transparency of the image

For 32 bit files!


er .... yeah ... that's what I meant :roll:

PostPosted: Sat Jan 13, 2007 5:05 am
by GreenGame
My image is a jpg.

Can both JPEG and GIF work for transparencies? Will a pic lower than 32 bit work or not, and does the 32 bit mean size or quality?

PostPosted: Sat Jan 13, 2007 2:19 pm
by makslane
32 bit image means a image with 24bits for color (R, G, B) per pixel plus 8bit for alpha channel.

Jpeg don't have alpha channel and, due compression, the color hue change every pixel. So, you don't have solid colors with jpeg.

PostPosted: Sat Jan 13, 2007 6:54 pm
by Game A Gogo
actually, not all pixel, the Jpeg files have some sort of compression system, depending on the compression value (from 0=smallest file/worts quality to 12=biggest file/best quality (Doesn't change the picture at all)

And depending on the compression value, you will be able to see that there is a somewhat square.

In other words, you can have a jpeg whit maximum quality, and have the worts of them.

Note:
When you have a solid section of color (MonoColor), it doesn't get blurred out

Note2:
MS Paint saves Jpeg image at a compression size of 6-7, so it has the most of small file and quality.

PostPosted: Sat Jan 13, 2007 11:38 pm
by Fuzzy
It is not true that a jpg of 100 quality has no detail loss.

Here is the original image in png format, which is compressed in a way that doesnt result in lost information..

Image

Here is the jpg version of that set to 100 quality.

Image

...and here is the result of both images being subtracted from each other.

Image

The lesson is: Dont trust jpg to not mangle your graphics.

PostPosted: Sun Jan 14, 2007 6:13 pm
by Game A Gogo
well, when i save my JPG, i save them at 120% quality, so there is absolute no loss