Edit report at https://bugs.php.net/bug.php?id=59095&edit=1

 ID:                 59095
 Comment by:         Dmoreno92 at hotmail dot com
 Reported by:        mail+pecl at rodneyrehm dot de
 Summary:            setGravity() and setImageGravity() have no effekt on
                     compositeImage()
 Status:             Suspended
 Type:               Bug
 Package:            imagick
 Operating System:   Mac OS X 10.6.2
 PHP Version:        5.3.1
 Block user comment: N
 Private report:     N

 New Comment:

Hey everyone it me once again Danny Moreno so want to you know i never 
subscribe php because done before i went on the website not newspaper one more 
thing thank you member of the php team so i think is it any questions about me 
send facebook text messages or e-mail so better luck next time peace.


Previous Comments:
------------------------------------------------------------------------
[2010-03-12 18:16:06] mkoppa...@php.net

Moved to here: 
http://www.imagemagick.org/discourse-server/viewtopic.php?f=6&t=15763

------------------------------------------------------------------------
[2010-03-02 17:12:06] mail+pecl at rodneyrehm dot de

I just tested the issue with Imagick 3.0.0RC1 and got the same (wrong) result.

------------------------------------------------------------------------
[2010-03-02 12:22:14] mail+pecl at rodneyrehm dot de

Description:
------------
The following command places the watermark.png nicely in the lower right corner 
of original.jpg:
composite -gravity SouthEast -geometry "+0+0" 'watermark.png' 'original.jpg' 
'output.jpg'

Trying the to get the same result with Imagick fails, though:
<?php

$wm = new Imagick( 'watermark.png' );
$im = new Imagick( 'original.jpg' );
$im->setImageGravity( Imagick::GRAVITY_SOUTHEAST );
$im->compositeImage( $wm, Imagick::COMPOSITE_DEFAULT, 0, 0 );
$im->writeImage( 'output.jpg' );

?>

Doing a <?php var_dump( Imagick::GRAVITY_SOUTHEAST, $im->getImageGravity() ); 
?> gives me »int 9, int 9« - which tells me the gravity is set properly.

Thus I guess compositeImage() simply ignores the gravity attribute.

Some info from phpinfo():
imagick module version: 2.3.0 
ImageMagick version: ImageMagick 6.6.0-0 2010-03-02 Q16


Reproduce code:
---------------
<?php

$wm = new Imagick( 'watermark.png' );
$im = new Imagick( 'original.jpg' );
$im->setImageGravity( Imagick::GRAVITY_SOUTHEAST );
$im->compositeImage( $wm, Imagick::COMPOSITE_DEFAULT, 0, 0 );
$im->writeImage( 'output.jpg' );

?>

Expected result:
----------------
watermark.png placed in bottom right corner on top of original.jpg

Actual result:
--------------
watermark.png placed in top left corner on top of original.jpg


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=59095&edit=1

Reply via email to