Complex regions

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
wurzelmac
Posts: 4
Joined: 2013-11-10T11:39:29-07:00
Authentication code: 6789

Complex regions

Post by wurzelmac »

For example: -region 100x100+50+50 is "only" a rectangle.
Is there a possibility to make complex regions such as polygons, or are only rectangles practicable?

Thanks in advance,
wurzelmac
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Complex regions

Post by fmw42 »

use -mask rather than -region and build your own mask shape using -draw

see
http://www.imagemagick.org/Usage/masking/#write_mask
http://www.imagemagick.org/Usage/draw/#primitives
wurzelmac
Posts: 4
Joined: 2013-11-10T11:39:29-07:00
Authentication code: 6789

Re: Complex regions

Post by wurzelmac »

Thanks for this very quick reply, much appreciated!

wurzelmac
wurzelmac
Posts: 4
Joined: 2013-11-10T11:39:29-07:00
Authentication code: 6789

Re: Complex regions

Post by wurzelmac »

Another question: Is it possible to "pixelize" an area that was specified with -draw like in the attached screenshot?
Thanks in advance, wurzelmac

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Complex regions

Post by fmw42 »

To pixelize:

convert rose: -scale 10% -scale 1000% show:
wurzelmac
Posts: 4
Joined: 2013-11-10T11:39:29-07:00
Authentication code: 6789

Re: Complex regions

Post by wurzelmac »

What a prompt help - thanks again!

Oh, and it seems to be that I have forgotten a bit of nettiquette: I am new here - thanks for every help, much appreciated!

Thanks a lot,
wurzelmac
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Complex regions

Post by fmw42 »

Post Reply