Readout of PNG chunks

I love using DO as a viewer for image files, the possibility to configure the details one get when hovering an image. As I'm a graphics developer, I currently work heavily with AI generated images. Those generated images get some meta data written into the chunks part of PNG files.
So I would like to feature request that DO could also readout this data from PNGs, so that we could use it via a tag like {name}, {picsize}, etc., something like {pnginfo}.
That would be really helpful.

1 Like

I also would love something like this -- the ability extract AI image metadata (which details the generation parameters) from .png chunks or .jpeg Exif within DOpus.

A way to make this data available to scripts in addition to tooltips, etc. would be ideal.

You can probably get the data to appear in Opus using this:

Thanks for that suggestion Leo, it looks very promising (but of course will take some time to study!).

I had vaguely seen mention of the underlying ExifTool before, but I never realized just how broadly it applies to all sorts of file type metadata.

1 Like

Thanks for this suggestion, but I'm not sure if this isn't complete overkill for a task, that also a text editor can do (PNG chunks can be manually read when opening the PNG in a text editor).
Also, I don't know if or how the ExifTool can put this information into the tool tip of DO.

@efourc Would be nice if you would share some information on that once you you have found out something. :+1:

Sure I can do that, although I don't know when I'll next have time to continue.

Edit: I also don't know if the data can be put into a tooltip...

For anyone's reference, so far I've tested the basic usage of ExifTool (not yet the DOpus script).

Running .\exiftool.exe .\image.png (or dragging an image onto exiftool(-k).exe for a popup window) gives the following:
cmd_eDr41K990W

Instead, using -b for binary to get rid of the . characters that replace newlines, and -Parameters to limit only to the section for AI image params gives:

.\exiftool.exe -b -Parameters .\image.png

(note: I don't know if different AI platforms use a different metadata tag name than 'Parameters', and I also haven't looked at .jpeg files yet.)

A side topic: I've been using EditPad Pro to view .png metadata because I could create a custom syntax color scheme, although it's not perfect. Editpad won't work this way for .jpeg metadata, and there are some occasional glitches for .png (like the unrelated '5' after 'Clip skip: 2' also gets highlighted).

In the end, I'd like to use ExifTool to quickly glance at the metadata within DOpus, and also send just the metadata to EditPad Pro for highlighting, but I haven't worked through the details of doing it yet.

Very helpful, many thanks for that! :+1:

Anything that appears in a column can be added to an info-tip.

That includes things that come from script columns like ExifTool Custom Columns.

You can edit Info-Tips via Settings > File Types. It's most likely the Images file type group that you want to edit for PNG files, although you could also edit the PNG type itself if you don't want to change what's displayed for other image types.

1 Like

Thanks, I will check this out and try to get it to work.

Well, I don't know if there is a problem with the script and new DO, or me not getting it.
I downloaded the JS and put it into the scripts folder. I restarted DO. I adjusted the path to exiftool.

They can be turned on and off via right-click in the column header Columns/Script/ExifTool.

I don't have or see such an option.

Select the files whose metadata interests you and run Generate Helper Files

When I do this, the script insists that exiftool.exe was not found (and of course I adjusted the path to the exe).

So, now I'm stuck, because the scripts don't work for me.
Any ideas?

Did you double the backslashes in the path, like in the original script? That's easily overlooked.

What does this line look like in your copy of the script?

var exeExifTool = fsu.Resolve('/bin\\exiftool\\exiftool.exe'); // -- Adjust to your system

Please also link your account if you need help in this much detail.

Ah, doubling the backslashes ... I should have known ... thanks for the hint. :+1: