Leser: 1
|< 1 2 >| | 16 Einträge, 2 Seiten |
Quote$image->copyResized($sourceImage,$dstX,$dstY,
$srcX,$srcY,$destW,$destH,$srcW,$srcH)
This method is similar to copy() but allows you to choose different sizes for the source and destination rectangles. The source and destination rectangle's are specified independently by (srcW,srcH) and (destW,destH) respectively. copyResized() will stretch or shrink the image to accomodate the size requirements.
Example:
$myImage = new GD::Image(100,100);
... various drawing stuff ...
$srcImage = new GD::Image(50,50);
... more drawing stuff ...
# copy a 25x25 pixel region from $srcImage to
# a larger rectangle starting at (10,10) in $myImage
$myImage->copyResized($srcImage,10,10,0,0,50,50,25,25);
Quote($width,$height) = $image->getBounds()
This method will return a two-member list containing the width and height of the image. You query but not not change the size of the image once it's created.
|< 1 2 >| | 16 Einträge, 2 Seiten |