Cropping from X to Y

See all posts See thread Reply

Re: Cropping from X to Y new!
by Mikee, 14 years, 3 months ago
I'm not fluent in English but i will try to explain what I mean ;)

We have a picture with dimensions of 800px/600px.

Let's get point A of with coordinates X:100px, y:100px
Let's get point B of with coordinates X:300px, y:350px

How to crop an imagr from point A to point B.

Example to wxplanation:
http://img171.imageshack.us/img171/4953/croping.jpgReply
Re: Cropping from X to Y new!
by colin, 14 years, 3 months ago
Use image_crop, with the for parameters Top, Right, Bottom and Left, in that order.

For instance, in your example:
$foo->image_crop = '100 500 250 100';

Note that you can use $foo->image_x and $foo->image_src_x to determine your margins, etc...Reply