Page 1 of 1

How to rotate a watermark png img at 45 degree on an jpg image?

Posted: 2016-07-26T20:16:52-07:00
by zxsz4084
How to rotate a watermark png img at 45 degree on a jpg image?

I have a transparent png file like " http://vi1.6rooms.com/live/chenlongtest/banquan.png " ,I will watermark it on a jpg image ,
I use command like this:
composite -gravity center banquan.png 2388.jpg 2388_bq.jpg

then the new image " http://vi1.6rooms.com/live/chenlongtest/2388_bq.jpg "。

I want to leans the "banquan.png" 45 degree on "2388.jpg", how to do ? thanks。

Re: How to rotate a watermark png img at 45 degree on an jpg image?

Posted: 2016-07-26T23:05:46-07:00
by fmw42
composite is nearly deprecated and less functional that convert. See http://www.imagemagick.org/Usage/compose/#compose

try (unix syntax)

Code: Select all

convert  2388.jpg  \( banquan.png -background none -rotate XX \) -gravity center -compose over -composite banquan.png2388_bq.jpg 
windows syntax

Code: Select all

convert  2388.jpg  ( banquan.png -background none -rotate XX ) -gravity center -compose over -composite banquan.png2388_bq.jpg 
Please always provide your IM version and platform when asking questions, since syntax differs. Please read the top most post in this forum at viewtopic.php?f=2&t=20598

Re: How to rotate a watermark png img at 45 degree on an jpg image?

Posted: 2016-07-26T23:40:35-07:00
by zxsz4084
Dear fmw42 ,thank you very much , it both works well in my two versions。

-bash-3.2$ /usr/local/ImageMagick/bin/convert -version
Version: ImageMagick 7.0.1-1 Q16 x86_64 2016-05-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI
Delegates (built-in): bzlib fontconfig freetype jng jpeg png tiff x xml

-bash-3.2$ convert -version
Version: ImageMagick 6.2.8 05/07/12 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC