I have looked around for this everywhere. I know it can be done using some libraries in .net, but I really want my script to generate a \"marked\" image. The reason is that we a
A suggestion: If you have a fixed iTXt chunk that you want to add to an image, a quick and dirty procedure could be to simply insert it just before the IEND chunk (12 bytes) of the original image. This should work, because the iTXt can be placed before of after the image data. Of course, this does not check if the chunk as already there.
Here's an example code, using the tEXt
chunk (slightly simpler), it needs some polishing but it basically works: