[Lazarus] Extract the color data and alpha from a PNG image

silvioprog silvioprog at gmail.com
Tue Feb 5 23:49:33 CET 2013


2013/2/5 José Mejuto <joshyfun at gmail.com>

> El 05/02/2013 15:36, silvioprog escribió:
>
>  Hello friends,
>>
>> I'm trying to extract the color data and alpha from a PNG image. In PHP
>> it is very easy to implement, but in FPC I don't know how to do it. I
>> tried to do it via "chunk.data", "ZData" etc., but, without success.
>>
>
> The question is what information are you looking for ? The compressed PNG
> data, uncompressed, palette applied or not... I doubt that you need the raw
> uncompressed bitmap.
>

You have puted a PNG image into a PDF? That's what I'm trying to do, and it
needs of the uncompressed data too (or compressed as gzip).


> That PHP code is a toy and can handle only a subset of PNGs.
>

FPDF is a very good library, and it does what it promises. It handles a
good range of PNG formats, indexeds, grayed, with or without palette etc.
So, if is so easy to do, how I it do then?

--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130205/37db5d23/attachment-0003.html>


More information about the Lazarus mailing list