possible bug show: or -combine starting 6.8.6.10

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

Re: possible bug show: or -combine starting 6.8.6.10

Post by fmw42 » 2013-10-16T16:46:09-07:00

anthony wrote:I have said many times. -combine really needs a 'colorspace' argument. The only solution I can see for backward compatibility is to have a new option that does the same job but takes a colorspace argument.

Remember -seperate and -combine should only copy values as they are it should not modify the values.
The issue is not -colorspace before -combine, but why the need for -set colorspace before -combine when doing it the old way. I was under the impression that the first line

convert xc:black -colorspace CMYK

told IM that the colorspace is CMYK. So why do we need to put -set colorspace before each -copy. It should already know to treat them as CMYK from the first line.

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: possible bug show: or -combine starting 6.8.6.10

Post by anthony » 2013-10-16T18:43:52-07:00

That is true.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

User avatar
fmw42
Posts: 25765
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug show: or -combine starting 6.8.6.10

Post by fmw42 » 2013-10-18T20:26:11-07:00

In the newly release 6.8.7.1, neither of these reproduce the original black pixel value.



imh convert xc:black -colorspace CMYK \
xc:black -compose CopyCyan -composite \
xc:black -compose CopyMagenta -composite \
xc:black -compose CopyYellow -composite \
xc:white -compose CopyBlack -composite \
-colorspace sRGB txt:
# ImageMagick pixel enumeration: 1,1,65535,srgb
0,0: (100%,100%,100%) #FFFFFFFFFFFF white


imh convert xc:black -colorspace CMYK \
xc:black -set colorspace CMYK -compose CopyCyan -composite \
xc:black -set colorspace CMYK -compose CopyMagenta -composite \
xc:black -set colorspace CMYK -compose CopyYellow -composite \
xc:white -set colorspace CMYK -compose CopyBlack -composite \
-colorspace sRGB txt:
# ImageMagick pixel enumeration: 1,1,65535,srgb
0,0: (100%,100%,100%) #FFFFFFFFFFFF white


The result should be black in either case.

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: possible bug show: or -combine starting 6.8.6.10

Post by anthony » 2013-10-20T19:13:29-07:00

One of the real problems is the CopyBlack does not copy from a grayscale image when no black channel exists!

That is it does not behave as CopyOpacity does, and use grayscale (or the intensity setting from non-greyscale) when the channel being copied does not actually exist.

It is a request I have made quite a few times.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: possible bug show: or -combine starting 6.8.6.10

Post by glennrp » 2013-10-21T07:12:59-07:00

IM 6.8.7-1 Q16 doesn't work very well for me. I get almost white:
  • # ImageMagick pixel enumeration: 1,1,65535,srgb
    0,0: (99.925230792706187799%,99.925230792706187799%,99.925230792706187799%) #FFCEFFCEFFCE srgb(99.925230792706187799%,99.925230792706187799%,99.925230792706187799%)
If I add -size 1x1 at the beginning of the commandline I get precisely white:
  • # ImageMagick pixel enumeration: 1,1,65535,srgb
    0,0: (100%,100%,100%) #FFFFFFFFFFFF white
If it is supposed to be black as Fred says, that's one bug.
The dependence on -size 1x1 seems to be a second bug.

Post Reply