List Info

Thread: Automatic conversion to RGBA




Automatic conversion to RGBA
country flaguser name
Germany
2007-03-22 12:35:35
Hi,
I would preffer the read images to be always in 8bpp RGBA
format without 
doing manual conversion, so I can rely on the pixel data
being in a 
fixed format after reading is done.

I've looked through the manual and noticed the
PNG_TRANSFORM_* flags for 
png_read_png, however it's not clear to me which of those I
need to get 
the described effect. Also, I'm not sure if I can just set a
fixed 
combination or have to set the flags depending on the image
format.

Thanks in advance,
    Tobias Käs
    Germany

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
png-mng-implement mailing list
png-mng-implementlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/png-m
ng-implement

Re: Automatic conversion to RGBA
country flaguser name
United States
2007-03-22 20:33:05
> I would preffer the read images to be always in 8bpp
RGBA format without 
> doing manual conversion, so I can rely on the pixel
data being in a 
> fixed format after reading is done.

> I've looked through the manual and noticed the
PNG_TRANSFORM_* flags for 
> png_read_png, however it's not clear to me which of
those I need to get 
> the described effect. Also, I'm not sure if I can just
set a fixed 
> combination or have to set the flags depending on the
image format.

In general, that requires quantization, so you're on your
own--libpng
doesn't support it.  (It doesn't support plain 24->8
quantization of
opaque images, either.)

pngquant and pngnq (standalone tools) do that, but I'm not
aware of any
library that does.  (Maybe imlib or something.)

Greg

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
png-mng-implement mailing list
png-mng-implementlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/png-m
ng-implement

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )