gflBrigthness(...) - strange mistake

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

Moderators: helmut, XnTriq, xnview

Post Reply
Serg
Posts: 13
Joined: Fri Oct 26, 2007 9:52 pm
Contact:

gflBrigthness(...) - strange mistake

Post by Serg »

Code: Select all

#include "stdafx.h"
#include "gflw.h"


#pragma comment(lib, "libgfl.lib")
#pragma comment(lib, "libgfle.lib")


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

       gflLibraryInit();

	   GFL_LOAD_PARAMS      load_option;
	   GFL_SAVE_PARAMS      save_params;
	   GFL_BITMAP           *pic;

	   gflGetDefaultLoadParams( &load_option );
	   load_option.FormatIndex = gflGetFormatIndexByName( "jpeg" );
       gflLoadBitmap( "E:\\001.jpg", &pic, &load_option, 0);

       gflBrigthness( pic, 0, -50 );

	   gflGetDefaultSaveParams( &save_params );
	   save_params.FormatIndex = gflGetFormatIndexByName( "jpeg" );

       gflSaveBitmap( "E:\\002.jpg", pic, &save_params );
	   gflLibraryExit();

       return 1;
}
Can you compile this code?
I can't, get error: 'gflBrigthness' : undeclared identifier

but Why? I have included "gflw.h"
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: gflBrigthness(...) - strange mistake

Post by xnview »

Serg wrote:

Code: Select all

#include "stdafx.h"
#include "gflw.h"


#pragma comment(lib, "libgfl.lib")
#pragma comment(lib, "libgfle.lib")


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

       gflLibraryInit();

	   GFL_LOAD_PARAMS      load_option;
	   GFL_SAVE_PARAMS      save_params;
	   GFL_BITMAP           *pic;

	   gflGetDefaultLoadParams( &load_option );
	   load_option.FormatIndex = gflGetFormatIndexByName( "jpeg" );
       gflLoadBitmap( "E:\\001.jpg", &pic, &load_option, 0);

       gflBrigthness( pic, 0, -50 );

	   gflGetDefaultSaveParams( &save_params );
	   save_params.FormatIndex = gflGetFormatIndexByName( "jpeg" );

       gflSaveBitmap( "E:\\002.jpg", pic, &save_params );
	   gflLibraryExit();

       return 1;
}
Can you compile this code?
I can't, get error: 'gflBrigthness' : undeclared identifier

but Why? I have included "gflw.h"
you must include libgfl.h not gflw.h
Pierre.
Serg
Posts: 13
Joined: Fri Oct 26, 2007 9:52 pm
Contact:

Post by Serg »

Have you tried do it?
I have changed and get this error again.
Serg
Posts: 13
Joined: Fri Oct 26, 2007 9:52 pm
Contact:

Post by Serg »

???
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

Serg wrote:???
It's not gflBrigthness but gflBrightness
Pierre.
Serg
Posts: 13
Joined: Fri Oct 26, 2007 9:52 pm
Contact:

Post by Serg »

xnview wrote:
Serg wrote:???
It's not gflBrigthness but gflBrightness
I copy this function from help directly,

Code: Select all

GFL_ERROR gflBrigthness(
  GFL_BITMAP * src,  
  GFL_BITMAP ** dst,  
  GFL_INT32 brightness
);
and did not check on mistakes. Next time I'll know....

Thanks. Now It's work.
Post Reply