Problem with rezising images ...

See all posts See thread Reply

Hmmm.... new!
by DaveW, 16 years ago
Stefan,

I'd have thought you should crop first, THEN resize the image!! I'm trying to do the same thing at the moment, but it's not working properly for me at all, I only came on to see if there was an answer to the issue!!!

Cheers

DaveReply
Re: Hmmm.... new!
by DaveW, 16 years ago
That said....

I've just downloaded the new version, anc exactly the same problem.

This is my code....
$t = CCGetParam("top") ;
$l = CCGetParam("left") ;
$h = CCGetParam("height") ;
$w = CCGetParam("width") ;
$rh = CCGetParam("reqh") ;
$rw = CCGetParam("reqw") ;

$b = $handle->image_src_y - ($t + $h) ;
$r = $handle->image_src_x - ($l + $w) ;

$handle->image_crop 	= array($t, $r, $b, $l);
$handle->image_resize          = true;
$handle->image_y	       = $rh;
$handle->image_x               = $rw;
$handle->image_convert         = 'jpg';
$handle->jpeg_quality          = 80;

$handle->Process('../tmp/') ;

If I comment out the resize, the crop works fine (and as expected)

If I comment out the crop, the resize works as expected!

Together, I get a jpeg image of 1x1

???????

Please helpReply