scaling a tile pattern?

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
junge

scaling a tile pattern?

Post by junge »

Hi

I would like to know how it is possible to scale (or generally manipulate the geometry of) the built-in patterns? For example if I generate a picture with a patternfilled rectangle:

convert -size 500x500 xc:white -tile pattern:bricks -draw 'rectangle 100,100 400,400' mybricks.png

and I would like the pattern to be resized so the bricks are twice as big as the default size. How do I do that?

I have tried the -scale option, but it seems to scale the whole picture no matter how I use it, even if I use parenthesis.

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

Re: scaling a tile pattern?

Post by fmw42 »

compare

convert -size 500x500 pattern:bricks mybricks.png

with

convert -size 250x250 pattern:bricks -scale 200% mybrick2.png


you need to reduce down the -size in proportion to the desired scaling
Post Reply