FilterAdjust

Parameters
to be certain to have a up to date information you can list all parameters with their description directly with the Filters API (see TutorialC1 in langage C or Tutorial3 in Delphi)

[inImage]
input image to adjust type : image

[outImage]
result image of adjust type : image

[brightness]
Brightness definition from Wikipedia type : integer

[contrast]
Contrast definition from Wikipedia type : integer

[autoAdjust]
automatic bright and contrast [brightness] and [contrast] parameter are ignored. type : boolean

C
see test13 in TutorialC1 printf("->test filterAdjust\n\n"); PBitmap32 imageLoaded = helper_loadImage( "lenna_color.bmp" ); if( imageLoaded != NULL ){ __int32 filterAdjust = filters_createFilter( "filterAdjust" ); PBitmap32 imageOut = image_createImageLike( imageLoaded ); filters_setParameterImage( filterAdjust, "inImage", imageLoaded ); filters_setParameterImage( filterAdjust, "outImage", imageOut ); filters_setParameterInteger( filterAdjust, "contrast", 255 ); // 128 = no change filters_setParameterInteger( filterAdjust, "brightness", 0 ); // 0 = no change filters_run( filterAdjust ); // save char strImageToSave[255]; strcpy( strImageToSave, "testFiltersDllC_output_adjust.jpg" ); printf( "save image to [%s]\n", strImageToSave ); helper_saveImage( imageOut, strImageToSave ); // dispose image_freeImage( imageOut ); filters_deleteFilter( filterAdjust ); image_freeImage( imageLoaded ); }

Delphi
imageOut := image.eraseOrCreateImageLike( imageOut, imageIn ); setParameterImage( filterAdjust, 'inImage', imageIn ); setParameterImage( filterAdjust, 'outImage', imageOut ); setParameterInteger( filterAdjust, 'contrast', 255 ); setParameterInteger( filterAdjust, 'brightness', 0 ); run( filterAdjust );