Cropping from X to Y

See all posts Reply

Cropping from X to Y new!
by Mikee, 14 years, 9 months ago
Hi,
How to crop image from one dimsenstion to other.

For example from position 50,50 to 100,100 (like position of axis of arithmetic).Reply
Re: Cropping from X to Y new!
by colin, 14 years, 9 months ago
I am not too sure what you mean, could you explain a bit more, giving examples?Reply
Re: Cropping from X to Y new!
by Mikee, 14 years, 9 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, 9 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