Ive built a cropper in flash … here’s a screencast of it working in action :
and below is a final still screenshot with all sorts of notes on it for the sake of this question.
So the cropper works fine, but flash can’t actually edit images, as we all know. So im going to use php gd on the server to do that. So what happens is the user uses the flash interface, and when they’re done they click “done” and flash sends variables over to php (the origin of the cropper, the width, the height, what the final image should be, etc etc)… Php uses those variables and using imagecopyresampled, makes the real change on the image.
my problem is, I cant quite get the math right in my imagecopyresampled variables
$destinationX = ?;
$destinationY = ?;
$destinationWidth = ?;
$destinationHeight = ?;
$sourceX = ?;
$sourceY = ?;
$sourceWidth = ?;
$sourceHeight = ?;
imagecopyresampled($thumb, $source, $destinationX, $destinationY, $sourceX, $sourceY, $destinationWidth, $destinationHeight, $sourceWidth, $sourceHeight);
Anyone have a clear enough understanding of imagecopyresampled to figure this out?