image crop polygon

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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.


Re: image crop polygon

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.

Quoted text here. Click to load it

Site Timeline