bright dark problem with composite
Posted: 2012-11-14T02:38:02-07:00
hello
since the last version of imagick or image magick (i don't know)
when i composite an image the result is too bright or too dark
i have this version of imagick : 3.1.0RC2
and this one of imagemagick : 6.8.0.4-1
what can i do ?
since the last version of imagick or image magick (i don't know)
when i composite an image the result is too bright or too dark
i have this version of imagick : 3.1.0RC2
and this one of imagemagick : 6.8.0.4-1
what can i do ?
Code: Select all
The third parameter fits the image into a "bounding box" */
$im->thumbnailImage( $width_require, $height_require, true );
/*$im->setImageColorspace(Imagick::COLORSPACE_RGB);
$im->modulateImage(100,0,100);*/
/* Create a canvas with the desired color */
$canvas = new Imagick();
$effect_param1 = 'black';
$canvas->newImage( $width_require, $height_require, $effect_param1, 'png' );
//$canvas->setImageColorspace(Imagick::COLORSPACE_RGB);
/* Get the image geometry */
$geometry = $im->getImageGeometry();
/* The overlay x and y coordinates */
$x = ( $width_require - $geometry['width'] ) / 2;
$y = ( $height_require - $geometry['height'] ) / 2;
/* Composite on the canvas */
$canvas->compositeImage( $im, imagick::COMPOSITE_OVER, $x, $y );
$canvas->writeImage($output);