Page 1 of 1
Handing failed about convert and watermark
Posted: 2015-07-07T19:39:50-07:00
by needkane
Watermark
background :
http://7xju4x.dl1.z0.glb.clouddn.com/fr ... ffffff.jpg
watermark photo:
http://7xju4x.dl1.z0.glb.clouddn.com/20 ... 718659.jpg
result:
http://7jpt6r.com1.z0.glb.clouddn.com/result (color changed)
command: convert imgs812375407.jpg -layers coalesce NULL: -geometry +10+10 ( /tmp/VdF-m9ZBBETqPD6TaAUlTQ.jpg -alpha set -channel A +channel -gravity SouthEast ) -layers composite wcomp506332115.jpg
Convert
origin:
http://ac-qu3i5h38.clouddn.com/56a8b0fc0ba55dde.jpg
result:
http://7jpt6r.com1.z0.glb.clouddn.com/result2.jpg (mark the different place)
command: convert origin -quality 75.0 -thumbnail 901x> +repage imgview2065838404.jpeg
Who can tell me why,please
Re: Handing failed about convert and watermark
Posted: 2015-07-07T20:27:39-07:00
by fmw42
What version of Imagemagick and what platform?
Your watermark photo is in CMYK colorspace. Composite will think it is RGB. So convert your watermark image to sRGB before compositing. Best to use profiles to convert.
command: convert imgs812375407.jpg -layers coalesce NULL: -geometry +10+10 ( /tmp/VdF-m9ZBBETqPD6TaAUlTQ.jpg -alpha set -channel A +channel -gravity SouthEast ) -layers composite wcomp506332115.jpg
This command makes no sense to me -- it is way too complicated, since you do not have a gif animation.
But you can do it by adding -profile as follows (unix syntax -- for windows see
http://www.imagemagick.org/Usage/windows/):
Code: Select all
convert front-female-ffffff.jpg -layers coalesce NULL: -geometry +10+10 \
\( 1434219718659.jpg -profile /Users/fred/images/profiles/sRGB.icc -alpha set -channel A +channel -gravity SouthEast \) \
-layers composite result.jpg
OR simpler as:
Code: Select all
convert front-female-ffffff.jpg \
\( 1434219718659.jpg -profile /Users/fred/images/profiles/sRGB.icc \) \
-gravity southeast -geometry +10+10 -compose over -composite result.jpg
See
http://www.imagemagick.org/Usage/compose/#compose
OR if you want the white to be transparent, then as:
Code: Select all
convert front-female-ffffff.jpg \
\( 1434219718659.jpg -profile /Users/fred/images/profiles/sRGB.icc \
-fuzz 40% -transparent white -channel alpha -blur 0x1 -level 50x100% +channel \) \
-gravity southeast -geometry +10+10 -compose over -composite result.jpg
Re: Handing failed about convert and watermark
Posted: 2015-07-08T06:52:35-07:00
by needkane
Convert
origin:
http://ac-qu3i5h38.clouddn.com/56a8b0fc0ba55dde.jpg
result:
http://7jpt6r.com1.z0.glb.clouddn.com/result2.jpg (mark the different place)
command: convert origin -quality 75.0 -thumbnail 901x> +repage imgview2065838404.jpeg
I also don‘t know why
Re: Handing failed about convert and watermark
Posted: 2015-07-08T08:45:39-07:00
by fmw42
I see no issue. There is a gray bar at the bottom of your input image and it looks to be relatively in the same place in your output image.
Re: Handing failed about convert and watermark
Posted: 2015-07-08T10:30:13-07:00
by Bonzo
I think you should start over needkane; you now have two different sets of examples and two problems in this thread.
Did you try any of fmw42's example code?
Post a link to the files you want to use with an expected output.
Re: Handing failed about convert and watermark
Posted: 2015-07-08T19:48:53-07:00
by needkane
fmw42 wrote:I see no issue. There is a gray bar at the bottom of your input image and it looks to be relatively in the same place in your output image.
I don't know why there is a gray bar at the bottom of my image after convert command.
Can you tell me why and how to resolve it?
Re: Handing failed about convert and watermark
Posted: 2015-07-08T23:11:16-07:00
by fmw42
There is a gray bar in the input image. Thus there will be a gray bar in the output image. Check your uploaded input image.
Re: Handing failed about convert and watermark
Posted: 2015-07-09T00:44:04-07:00
by snibgo
The input jpg seems to be corrupted. I get:
Code: Select all
Version: ImageMagick 6.9.1--6 Q16 x64 2015-06-20 http://www.imagemagick.org
identify.exe: Premature end of JPEG file `56a8b0fc0ba55dde.jpg' @ warning/jpeg.c/JPEGWarningHandler/352.
identify.exe: Corrupt JPEG data: premature end of data segment `56a8b0fc0ba55dde.jpg' @ warning/jpeg.c/JPEGWarningHandler/352.
Re: Handing failed about convert and watermark
Posted: 2015-07-14T03:29:42-07:00
by needkane
snibgo wrote:The input jpg seems to be corrupted. I get:
Code: Select all
Version: ImageMagick 6.9.1--6 Q16 x64 2015-06-20 http://www.imagemagick.org
identify.exe: Premature end of JPEG file `56a8b0fc0ba55dde.jpg' @ warning/jpeg.c/JPEGWarningHandler/352.
identify.exe: Corrupt JPEG data: premature end of data segment `56a8b0fc0ba55dde.jpg' @ warning/jpeg.c/JPEGWarningHandler/352.
I know this picture was corrupted,but i don't understand detail
Re: Handing failed about convert and watermark
Posted: 2015-07-14T03:30:44-07:00
by needkane
fmw42 wrote:There is a gray bar in the input image. Thus there will be a gray bar in the output image. Check your uploaded input image.
how to check and how to explain the bug
Re: Handing failed about convert and watermark
Posted: 2015-07-14T03:34:52-07:00
by dlemstra
How did you get the input image?