Error with gflSetIPTCValue

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

Moderators: helmut, XnTriq, xnview

User avatar
Ithier
Posts: 47
Joined: Fri Nov 19, 2004 10:50 am
Location: Paris, France

Error with gflSetIPTCValue

Post by Ithier »

When I use gflSetIPTCValue function I always have a "Bad parameters" error even when it works !!

Code: Select all

#include "stdio.h"
#include "libgfl.h"

int main(int argc, char* argv[])
{
	gflLibraryInit();

	//Addinf IPTC Data
    GFL_IPTC_DATA* iptc = gflNewIPTC();
    
	GFL_ERROR err = gflSetIPTCValue(iptc, GFL_IPTC_BYLINE, "test18");
	printf ("Error: %d: %s", err, gflGetErrorString(err));

	//Error but we still try to write
	gflSaveIPTC("output1.jpg", iptc);
    gflFreeIPTC(iptc);

	return 0;
}
When I run this code I got the described error , but if I open the output1.jpg file I can see the new IPTC data.

I use the last version of GFL SDK.

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

Re: Error with gflSetIPTCValue

Post by xnview »

Ithier wrote:When I use gflSetIPTCValue function I always have a "Bad parameters" error even when it works !!
Yes, right a bug
Pierre.