I'm using imagecopyresampled to resize an image and crop part of it at the same time. The area I need to crop, unfortunately, is sometimes a float, which leads to my problem. imagecopyresampled does not accept float values, and interpolate the images. (Well, technically it accepts them, but just converts them to an integer internally)
The source image is 63x63 pixels ($rImg1). The destination image is 100x100 pixels ($rImg2).
I want to resize $rImg1 to 100.611x100.611, and place the center 100x100 square in $rImg2. The theoretical imagecopyresampled call is below.
imagecopyresampled($rImg2, $rImg1, -0.3055, -0.3055, 0, 0, 100.611, 100.611, 63, 63);
I realize the above code is incorrect, but it seemed the best way to illustrate what I'm attempting to accomplish.
Any help would be greatly appreciated, thanks!
Chris
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php