S
S
sdevalex2012-08-09 22:24:04
linux
sdevalex, 2012-08-09 22:24:04

Imagemagick, crop image by mask or polygon

You need to crop the edges of the image, “bite off” the triangles along the edge. Can imagemagick crop image by mask or polygon? Something like this... the cropped areas should be left transparent.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Akulovich, 2012-08-09
@sdevalex

composite

F
fst, 2012-08-09
@fst

convert src.jpg -matte polygon.png -compose DstIn -composite out.png
src.jpg - source image
polygon.png - arbitrary white shape on a transparent background
out.png - end result

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question