Page 1 of 1
IPTC samples needed (Delphi or other)
Posted: Fri Mar 11, 2005 8:05 am
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!
Re: IPTC samples needed [Delphi or other]
Posted: Fri Mar 11, 2005 10:26 am
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);
Posted: Fri Mar 11, 2005 11:00 am
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
Posted: Fri Mar 11, 2005 1:15 pm
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
Posted: Mon Mar 14, 2005 1:31 pm
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?