Problem with rezising images ...

See all posts See thread Reply

Re: Problem with rezising images ... new!
by DaveW, 15 years, 6 months ago
Stephan,

I haven't tried this, but expected that it'd work because it's a two step process (which I wanted to avoid). I'll wait for Colin to finish his investigations before I commit to a 2 step process.

Cheers

Dave

N.B. A a particular thanks to Colin for his quick response.Reply
Re: Problem with rezising images ... new!
by Stefan, 15 years, 6 months ago
I'll use my 'temporary' working code until Colin have a better solution working.
Anyway, my site is not live yet, so it's just me sending up test pictures :-)

/StefanReply
Re: Problem with rezising images ... new!
by colin, 15 years, 6 months ago
The class as version 0.26 cannot do what you want.

So here is a Release Candidate 0.27RC1, which implements a mean to crop before resizing.

The cropping is set with image_precrop, which accepts the same type of parameters as image_crop.

For instance:
$handle->image_precrop = array(-34, 0, 98, 100);
This will crop the image before eventually resizing it.

Note that both image_precropand image_crop can be used together. The first one crops before resizing, the second one after resizing.

The test suite looks OK, but I haven't tested it extensively. Feedback would be appreciated.Reply