<div dir="ltr">2013/2/5 José Mejuto <span dir="ltr"><<a href="mailto:joshyfun@gmail.com" target="_blank">joshyfun@gmail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
El 05/02/2013 15:36, silvioprog escribió:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hello friends,<br>
<br>
I'm trying to extract the color data and alpha from a PNG image. In PHP<br>
it is very easy to implement, but in FPC I don't know how to do it. I<br>
tried to do it via "chunk.data", "ZData" etc., but, without success.<br>
</blockquote>
<br></div>
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.<br></blockquote><div><br></div><div>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).<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
That PHP code is a toy and can handle only a subset of PNGs.<br><span class=""><font color="#888888"></font></span></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">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?<br>
</div><div class="gmail_extra"><br></div>--<br>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>