IPTC samples needed (Delphi or other)

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: helmut, XnTriq, xnview

kurka666
Posts: 47
Joined: Thu Mar 10, 2005 11:41 am

IPTC samples needed (Delphi or other)

Post by kurka666 »

Hi. I'd like to see some samples using gflLoadIPTC, gflSetIPTCValue and gflSaveIPTC. Does anyone have this?

I'd also like to see some samples where IPTC is read/written using a loaded bitmap.

Thanks!
User avatar
xnview
Author of XnView
Posts: 45837
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: IPTC samples needed [Delphi or other]

Post by xnview »

kurka666 wrote:Hi. I'd like to see some samples using gflLoadIPTC, gflSetIPTCValue and gflSaveIPTC. Does anyone have this?

I'd also like to see some samples where IPTC is read/written using a loaded bitmap.
Here is:

Code: Select all

GFL_IPTC_DATA * iptc_data; 
iptc_data = gflLoadIPTC("file.jpg"); 
gflSetIPTCValue( iptc_data, GFL_IPTC_CREDITS, "Credits" ); 
gflSaveIPTC("file.jpg", iptc_data); 
gflFreeIPTC(iptc_data); 
Pierre.
Guest

Post by Guest »

Are you sure this works? When I try your code (in Delphi) the gflLoadIPTC function returns an empty iptc-structure (NumberOfItems = zero) even if there are a lots of IPTC data in there. I manage to insert the new tag with value 'credits', but after I save back to file, this is the only tag in the file since it was empty upon read.

I can verify that there are IPTC data in the file by reading IPTC data via the bitmap
kurka666
Posts: 47
Joined: Thu Mar 10, 2005 11:41 am

Post by kurka666 »

Another thing: even though gflSetIPTCValue seems to work fine in your example, the error code returned is 50! If this function returns 50 it shouldn't have uptaded the structure?

Thanks for your help!

Henrik
User avatar
xnview
Author of XnView
Posts: 45837
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

Anonymous wrote:Are you sure this works? When I try your code (in Delphi) the gflLoadIPTC function returns an empty iptc-structure (NumberOfItems = zero) even if there are a lots of IPTC data in there. I manage to insert the new tag with value 'credits', but after I save back to file, this is the only tag in the file since it was empty upon read.

I can verify that there are IPTC data in the file by reading IPTC data via the bitmap
Could you send me the sample that you use?
Pierre.