FANDOM


< Filters documentation

Example Edit

inImage
FilterAdjust inImage

inImage

test contrast
FilterAdjust outImage contrast low

low contrast

FilterAdjust outImage contrast hight

high contrast

test brightness
FilterAdjust outImage brightness low

low brightness

FilterAdjust outImage brightness hight

high brightness

Parameters Edit

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] Edit

input image to adjust
type : image

[outImage] Edit

result image of adjust
type : image

[brightness] Edit

Brightness definition from Wikipedia
type : integer

[contrast] Edit

Contrast definition from Wikipedia
type : integer

[autoAdjust] Edit

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

Sample code Edit

C Edit

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 Edit

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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.