hi all
my goal is to display the opaque part of a PNG image, and skip the transparent part of it(like acdsee )
I use libpng, use Double Frame Buffer and set display mode to PSP_DISPLAY_PIXEL_FORMAT_8888
the follow is my code fragment:
for (y = 0; y < info_ptr->height; y ++)
{
png_byte *prow = prowtable[y];
for (x = 0; x < info_ptr->width; x ++)
{
b = *prow++;
g = *prow++;
r = *prow++;
a = * prow++; // It' doesnt' work
iRetCode = __rgbaToColorAuto( lpImgData,r,g,b, a);//copy to image buffer
lpImgData+=__global_iPGPixelSize;
}
}
but it does'nt work, I think the fourth byte of png pixel is not as same as psp's alpha channel, Could you please tell me How should I disp a png image correctly?