It is currently Fri Nov 27, 2020 3:22 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: png metadata
PostPosted: Wed Aug 08, 2018 3:26 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Mar 11, 2009 4:06 pm
Posts: 327
Location: NL
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: png metadata
PostPosted: Sat Sep 19, 2020 5:58 pm 
Offline
Addict
Addict

Joined: Wed Feb 28, 2007 9:13 am
Posts: 1076
Location: London
+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:
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:
ReadImageEXIFData(filename,@exif.NativePBExifStructure)
WriteImageEXIFData(filename,@exif.NativePBExifStructure)

_________________
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye