How can I auto-crop a pre-defined polygon shape from an image file?
Ideally using a Python library or processing.org, I need to import开发者_JAVA百科 an image and then crop a predefined polygon area from this image using x,y coordinates (vertices).
Thanks.
Try PythonMagick. Your question appears to be a cut-and-dry application of crop
through specification of image geometry.
(More ImageMagick ports and documentation.)
Also check out PIL.
Though this is hardly library specific and almost every library should support this.
精彩评论