Handing failed about convert and watermark

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Handing failed about convert and watermark

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Handing failed about convert and watermark

Post 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
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Re: Handing failed about convert and watermark

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Handing failed about convert and watermark

Post 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.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Handing failed about convert and watermark

Post 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.
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Re: Handing failed about convert and watermark

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Handing failed about convert and watermark

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Handing failed about convert and watermark

Post 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.
snibgo's IM pages: im.snibgo.com
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Re: Handing failed about convert and watermark

Post 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
needkane
Posts: 47
Joined: 2014-09-11T02:19:30-07:00
Authentication code: 6789

Re: Handing failed about convert and watermark

Post 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
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Handing failed about convert and watermark

Post by dlemstra »

How did you get the input image?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply