how to define -tile

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
liyucmh
Posts: 17
Joined: 2016-01-29T04:53:32-07:00
Authentication code: 1151

how to define -tile

Post by liyucmh »

Dear everyone,

I am new here, I need your help, thanks

how to define -tile, such as watermark's position, 45°degree, not too many , like below
Image

I use this command, but it is too many watermarks and can not 45°degree

Code: Select all

composite -tile -gravity center logofuli.png myg182_01.jpg test.jpg
the result is below, not my wanted
Image
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: how to define -tile

Post by snibgo »

The trick is to create logofuli.png at whatever size you need for the output, containing whatever image you need repeating.
snibgo's IM pages: im.snibgo.com
liyucmh
Posts: 17
Joined: 2016-01-29T04:53:32-07:00
Authentication code: 1151

Re: how to define -tile

Post by liyucmh »

snibgo wrote:The trick is to create logofuli.png at whatever size you need for the output, containing whatever image you need repeating.
thanks for your reply

I mean the logofuli.png is a fixed png file, how to add some parameter into this command

Code: Select all

composite -tile -gravity center logofuli.png myg182_01.jpg test.jpg
that can make the output watermark file like this:
Image



not this Image

my english is a little poor, sorry, maybe i did not describe well.
HaroldWindt
Posts: 11
Joined: 2015-06-02T05:04:29-07:00
Authentication code: 6789

Re: how to define -tile

Post by HaroldWindt »

liyucmh wrote:
snibgo wrote:The trick is to create logofuli.png at whatever size you need for the output, containing whatever image you need repeating.
thanks for your reply

I mean the logofuli.png is a fixed png file, how to add some parameter into this command

Code: Select all

composite -tile -gravity center logofuli.png myg182_01.jpg test.jpg

my english is a little poor, sorry, maybe i did not describe well.
Resize the logofuli.png to fit your image

1. Get the width and height of the output image
2. Resize your PNG file in accordance with the width & height obtained from (1)
convert -resize WidthXHeight logofuli.png logofuli_Resized.png
3. If you want the watermark to be low then you can adjust the width and height accordingly with what you obtained from (1)
4. Use logofuli_Resized.png and apply it on your output image
liyucmh
Posts: 17
Joined: 2016-01-29T04:53:32-07:00
Authentication code: 1151

Re: how to define -tile

Post by liyucmh »

HaroldWindt wrote:
liyucmh wrote:
snibgo wrote:The trick is to create logofuli.png at whatever size you need for the output, containing whatever image you need repeating.
thanks for your reply

I mean the logofuli.png is a fixed png file, how to add some parameter into this command

Code: Select all

composite -tile -gravity center logofuli.png myg182_01.jpg test.jpg

my english is a little poor, sorry, maybe i did not describe well.
Resize the logofuli.png to fit your image

1. Get the width and height of the output image
2. Resize your PNG file in accordance with the width & height obtained from (1)
convert -resize WidthXHeight logofuli.png logofuli_Resized.png
3. If you want the watermark to be low then you can adjust the width and height accordingly with what you obtained from (1)
4. Use logofuli_Resized.png and apply it on your output image
thanks

does this mean we can not add parameter to -tile command that can control the watermark's number and position?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: how to define -tile

Post by snibgo »

You can rotate the watermark within the composite command:

Code: Select all

composite -tile -gravity center ( logofuli.png -rotate 30 ) myg182_01.jpg test.jpg
I don't know how to change the width and height within the composite command.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how to define -tile

Post by fmw42 »

You can do more things using convert .... -composite than you can with composite. I suggest you learn the new syntax, since composite is old and may eventually be deprecated. See http://www.imagemagick.org/Usage/compose/#compose and http://www.imagemagick.org/Usage/canvas/#tile
Post Reply