Image ContrastStretch parameter syntax novice question
Posted: 2007-11-06T05:26:11-07:00
Another beginer question:-
What is the syntax for the parameters needed for contrast stretch?
bool Imagick::contrastStretchImage ( float $black_point, float $white_point [, int $channel] )
I am trying to test basic capability to perform contrast adjustments. the following code executes but produces no transform of the output compared to the input image, I have tried experimenting with values for black point and whitepoint, which is not a very productive use of time, I tried strings, hex values etc.... Am I missing something or just doing somthing stupid......?
<?php
/*
Test of Contrast Stretch
*/
header( 'Content-Type: image/jpeg' );
$Imagick = new Imagick();
$infilename="c:/tmp/bigimagedark.jpg" ; // Artificaly compresed contrast test image
$Imagick->readImage( $infilename );
$Imagick->ContrastStretchImage();
$outimage="c:/tmp/testoutimage.jpg" ;
$Imagick->writeImage($outimage);
?>
What is the syntax for the parameters needed for contrast stretch?
bool Imagick::contrastStretchImage ( float $black_point, float $white_point [, int $channel] )
I am trying to test basic capability to perform contrast adjustments. the following code executes but produces no transform of the output compared to the input image, I have tried experimenting with values for black point and whitepoint, which is not a very productive use of time, I tried strings, hex values etc.... Am I missing something or just doing somthing stupid......?
<?php
/*
Test of Contrast Stretch
*/
header( 'Content-Type: image/jpeg' );
$Imagick = new Imagick();
$infilename="c:/tmp/bigimagedark.jpg" ; // Artificaly compresed contrast test image
$Imagick->readImage( $infilename );
$Imagick->ContrastStretchImage();
$outimage="c:/tmp/testoutimage.jpg" ;
$Imagick->writeImage($outimage);
?>