From:             
Operating system: Centos (Red Hat)  5.6
PHP version:      Irrelevant
Package:          *Graphics related
Bug Type:         Bug
Bug description:width position does not work.

Description:
------------
Gmagick::compositeimage

When placing smaller image on top of larger image, the 'x' parameter does
not work. Whatever the value the resulr is x= 0.  X is the width.

X = 0, y = 0 is the top left corner. Trying to position in the bottom right
corner results in the image appearing in the bottom left corner regardless
of the value of 'x' being the 3rd parameter in

$picin->compositeimage($pj,1,570,350);

The larger image is 800 wide, 450 high, JPG. The smaller image is 222 wide
by 98 high and is a PNG with a transparent background.



Test script:
---------------
PIC1 = 3840 wide x 2160 high.

$picin = new Gmagick($pic1);
$picin->scaleimage(800,0);
$height = $picin->getimageheight();
$picin->setimagefilename($pic3);
$picin->writeimage($pic3);

$pj = new gmagick($dir2.'pj5.png');
$picin->compositeimage($pj,1,577,$height-98);

# 222 x 98 / 800 x 450

$pic6  = $dir2.$ref.'-000.jpg';
$picin->writeimage($pic6);

Expected result:
----------------
The smaller image positioned in the bottom right corner of the larger
image.

Actual result:
--------------
The smaller image is position in the bottom left corner.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=55638&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55638&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55638&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55638&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55638&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55638&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55638&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55638&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55638&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55638&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55638&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55638&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55638&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55638&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55638&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55638&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55638&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55638&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55638&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55638&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55638&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55638&r=mysqlcfg

Reply via email to