简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM