image crop polygon
am 09.10.2007 20:09:54 von Ofir Picazo
Hello everyone,
I'm trying to crop a polygon (defined as an array of coordinates) from
a larger image. I read lots about gd and imagick but couldn't find an
easy way to do it. Please let me know if you have any ideas.
Thanks
Re: image crop polygon
am 10.10.2007 08:25:45 von petersprc
Not sure how you would do it.
One way could be to copy the smallest rectangle enclosing the
selection with imagecopyresized. Then clear the background part using
the scan-line polygon fill algorithm.
On Oct 9, 1:09 pm, Ofir Picazo wrote:
> Hello everyone,
> I'm trying to crop a polygon (defined as an array of coordinates) from
> a larger image. I read lots about gd and imagick but couldn't find an
> easy way to do it. Please let me know if you have any ideas.
>
> Thanks