Page 1 of 1

png metadata

Posted: Wed Aug 08, 2018 3:26 pm
by Rinzwind
Would be nice if we can add text to a png file to describe the default or custom properties. The libpng PB uses supports it.

Re: png metadata

Posted: Sat Sep 19, 2020 5:58 pm
by Seymour Clufley
+1

PNG EXIF metadata has now been standardised. EXIF has always been standardised for JPEG and TIFF (though not JPEG2000).

One way to implement it would be by extending LoadImage() and SaveImage() with a pointer to an EXIF data structure:

Code: Select all

Structure NativePBExifStructure
; standard EXIF fields
EndStructure

fn.s = "C:\my-diagram.png"
img = LoadImage(#PB_Any,fn,@exif.NativePBExifStructure)
exif\DateTimeOriginal = Date()
SaveImage(img,fn,#PB_ImagePlugin_PNG,flags,depth,@exif)
But it might be simpler and more efficient to implement it as separate commands, like this:

Code: Select all

ReadImageEXIFData(filename,@exif.NativePBExifStructure)
WriteImageEXIFData(filename,@exif.NativePBExifStructure)

Re: png metadata

Posted: Sun Oct 24, 2021 1:43 am
by IdeasVacuum
The ability to read Exif data would be very very useful +1

Re: png metadata

Posted: Mon Oct 25, 2021 7:23 pm
by davido
+1 and +1