PNG image shows tranceparent in 3x but not in 2x? | developer.brewmp.com PNG image shows tranceparent in 3x but not in 2x? | developer.brewmp.com

Developer

PNG image shows tranceparent in 3x but not in 2x?

Forums:

Hi All,

I am using a PNG image which has background tranceparent. It shows up properly in 3x Simulator and device, but when the same code i tried in 2x simulator it does not shows tranceparent background :confused:

Can anybody tell me the reason why it is happening like that?

I also tried IIMAGE_SetParm(pPNGImg,IPARM_ROP, AEE_RO_TRANSPARENT, 0); for showing up the tranceparency.

Here is the sample code that i am using :-
IImage *pPNGImg;
ISHELL_CreateInstance(pMe->m_pIShell, AEECLSID_PNG, (void **)&pPNGImg);
pPNGImg = ISHELL_LoadImage(pMe->m_pIShell, "mood.png");

//IIMAGE_SetParm(pPNGImg,IPARM_ROP, AEE_RO_XOR, 0);
IIMAGE_Draw(pPNGImg,10, 20);

Are you using magenta (FF00FF) as your transparent color? It seems that in BREW 3.1, or at least the 3.1 simulator, it will usually use the first color in the palette as the transparent color, while in earlier versions, it will default to magenta as the transparent color.

Are you using magenta (FF00FF) as your transparent color? It seems that in BREW 3.1, or at least the 3.1 simulator, it will usually use the first color in the palette as the transparent color, while in earlier versions, it will default to magenta as the transparent color.

yes i tried with the meganta color (FF,0,FF) but that doest not make any differrence :confused:
I do have one doubt that image i am using is 32-bit image. Can it create problem like transparent issue in 2.1.3 simulator/devices??

yes i tried with the meganta color (FF,0,FF) but that doest not make any differrence :confused:
I do have one doubt that image i am using is 32-bit image. Can it create problem like transparent issue in 2.1.3 simulator/devices??

I think the problem is that some devices are 65K colors, but the PNGs are in full 8-bit channel RGB (1.6MM). I've noticed that the simulator and my E815 cannot handle True Color PNGs, but that the RAZRs (Brew 3) do the color conversion just fine, even though both are 65K colors.
Does anyone know how to convert PNGs to 65K colors? I have a tool that converts to 256 colors, but not 65K.
Andy

I think the problem is that some devices are 65K colors, but the PNGs are in full 8-bit channel RGB (1.6MM). I've noticed that the simulator and my E815 cannot handle True Color PNGs, but that the RAZRs (Brew 3) do the color conversion just fine, even though both are 65K colors.
Does anyone know how to convert PNGs to 65K colors? I have a tool that converts to 256 colors, but not 65K.
Andy

Thanks Andy for sharing this info :)
Can u give me that tool that converts to 256 colors? Hope it can be useful for me to debug other issues :D
Thanks,
Ajeet Singh

Thanks Andy for sharing this info :)
Can u give me that tool that converts to 256 colors? Hope it can be useful for me to debug other issues :D
Thanks,
Ajeet Singh

Tools I have used:
1. Pixel Editor - I've been using this for 9 months, it's great.
2. PNGOUT - Great lossless compression tool.
3. imagemagick - Just found this tool. Looks pretty cool.
I used #3 to convert to 65K colors (16 bit depth), but it 3x image size and PNGOUT wouldn't work. I'm leaving it to my graphics folks to figure out how to make the 256 overlays look good, now that I know 8bit color depth is the way to make things work on the older MOTO phones.

Tools I have used:
1. Pixel Editor - I've been using this for 9 months, it's great.
2. PNGOUT - Great lossless compression tool.
3. imagemagick - Just found this tool. Looks pretty cool.
I used #3 to convert to 65K colors (16 bit depth), but it 3x image size and PNGOUT wouldn't work. I'm leaving it to my graphics folks to figure out how to make the 256 overlays look good, now that I know 8bit color depth is the way to make things work on the older MOTO phones.