Chris wrote --- napísal::
Hi there, I've looked in many places but have not found any clues on how to work around this problem.

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


One pixel is the smallest value in images. How do you want your resulting image to look like? You can resize the image to higher resolution, but you will need to create 100611x100611 pixel image, and that's one hell a lot of memory :)


So, what are you trying to achieve?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to