Page 1 of 1
gflBrigthness(...) - strange mistake
Posted: Wed Oct 31, 2007 5:49 pm
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"
Re: gflBrigthness(...) - strange mistake
Posted: Thu Nov 01, 2007 10:57 am
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
Posted: Thu Nov 01, 2007 1:07 pm
by Serg
Have you tried do it?
I have changed and get this error again.
Posted: Fri Nov 02, 2007 10:39 am
by Serg
???
Posted: Mon Nov 05, 2007 8:24 am
by xnview
Serg wrote:???
It's not gflBrigthness but gflBrightness
Posted: Mon Nov 05, 2007 8:34 am
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.