ImageMagick `convert -composite` working on some, not on others
The problem
I'm running a convert command on a bunch of different images. Mostly, it's working just fine, but I noticed that a couple of images weren't being watermarked, as if the -composite
command wasn't even there.
The command
convert src.jpg -colorspace RGB -resize 1500x1500\> -strip watermark.png -composite out.jpg
The -colorspace
, -resize
, and -strip
commands are not really necessary in this test. But I get the same results if I remove them:
convert src.jpg watermark.png -composite out.jpg
The image files
http://files.mattalexander.me/imtest.zip
*** ~: unzip -l imtest.zip
Archive: imtest.zip
Length Date Time Name
--------- ---------- ----- ----
0 2010-开发者_C百科11-13 18:54 imtest/
22676 2010-11-18 11:12 imtest/out.jpg
48 2010-11-13 18:54 imtest/run
23293 2010-11-13 18:47 imtest/src.jpg
76232 2010-11-13 18:47 imtest/watermark.png
--------- -------
122249 5 files
Software versions
Server #1
*** ~: cat /etc/issue
Ubuntu 9.10 \n \l
*** ~: uname -a
Linux *** 2.6.31-22-server #67-Ubuntu SMP Sat Oct 16 19:03:54 UTC 2010 x86_64 GNU/Linux
*** ~: convert --version
Version: ImageMagick 6.5.1-0 2009-08-27 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Server #2
*** ~: cat /etc/issue
CentOS release 5.5 (Final)
Kernel \r on an \m
*** ~: uname -a
Linux *** 2.6.18-194.8.1.el5.028stab070.5 #1 SMP Fri Sep 17 19:10:36 MSD 2010 i686 i686 i386 GNU/Linux
*** ~: convert --version
Version: ImageMagick 6.2.8 10/20/10 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
I tried this out and the watermark does get applied with the given command (I'm assuming the "\>" is an error and is meant to be ">"):
convert src.jpg -colorspace RGB -resize 1500x1500> -strip watermark.png -composite out.jpg
I'm using IM 6.6.5-8 on 32bit Windows.
The watermark however is very difficult to see on the given source image.
The output file is here: out.jpg
精彩评论