Hi,
Is there an easy way to access png text chunks through TImage?
Thanks,
Vyacheslav
Hi,
Is there an easy way to access png text chunks through TImage?
Thanks,
Vyacheslav
You mean retrieving a text string drawn in binary picture like a png file ?
No, this does not exist.
I’m guessing that Vyacheslav is asking if you can access the embedded text in a png file. I don’t know if or how to do it in Root, but I have an example script that both embeds text in png files and then extracts it:
www-cdf.fnal.gov/~cplager/latex/#png
Cheers,
Charles
Sorry, let me be more detailed.
I have an application that creates a TImage from a png buffer using
SetImageBuffer(&my_char_png_buffer)
There is some useful info contained in the zTXt chunk that i would also like to extract. It does not look to me at this point like it is possible without writing a custom png read function.
That is what I thought you meant. Looking at my script (linked above), it looks like:
pngtopnm -text output.txt myimage.png
extracts the text. Assuming you have pngtopnm on your system, you can run this from Root.
Cheers,
Charles