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!
IPTC samples needed (Delphi or other)
Moderators: helmut, XnTriq, xnview
-
- Author of XnView
- Posts: 45837
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: IPTC samples needed [Delphi or other]
Here is: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.
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.
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
I can verify that there are IPTC data in the file by reading IPTC data via the bitmap
-
- Posts: 47
- Joined: Thu Mar 10, 2005 11:41 am
-
- Author of XnView
- Posts: 45837
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Could you send me the sample that you use?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
Pierre.