Page 1 of 1

False Grayscale detection for CMYK image

Posted: 2017-08-03T21:39:24-07:00
by Roman80
Hello,

i tested a CMYK image with 7.0.6-4 version of IM under Windows.
A RGB color image was detected as 24 bit RGB, the same image but with CMYK colorspace is detected as Grayscale.

I could narrow down the problem to

SetImageGray() -> IdentifyImageGray() -> IsPixelGray() -> this function should return false => UndefinedType.

Regards
Roman

Re: False Grayscale detection for CMYK image

Posted: 2017-08-03T21:42:25-07:00
by fmw42
Probably best if you upload an example image to some free image hosting service that won't change the format and put the URL here.

Re: False Grayscale detection for CMYK image

Posted: 2017-08-03T23:09:12-07:00
by Roman80
Which free image hosting service could you recommend?

Re: False Grayscale detection for CMYK image

Posted: 2017-08-03T23:24:30-07:00
by fmw42
I use dropbox.com, but I am sure there are others.

Re: False Grayscale detection for CMYK image

Posted: 2017-08-04T06:05:39-07:00
by Roman80

Re: False Grayscale detection for CMYK image

Posted: 2017-08-04T06:44:08-07:00
by snibgo
You have uploaded two identical files, both encoded as sRGB.

Re: False Grayscale detection for CMYK image

Posted: 2017-08-04T07:58:53-07:00
by Roman80
snibgo wrote: 2017-08-04T06:44:08-07:00 You have uploaded two identical files, both encoded as sRGB.
No, they are not identical. Have a look at the comparison: https://www.dropbox.com/s/qddet5vqwtgr9 ... e.jpg?dl=0
The left image is the CMYK the right image is RGB.
You can see the difference for example by the color green, blue or cyan.

Re: False Grayscale detection for CMYK image

Posted: 2017-08-04T08:44:18-07:00
by snibgo
My mistake. I downloaded the same file twice. Sorry.

In v7.0.1-0, "magick identfy" on the CMYK file says:

Code: Select all

Image: c:downloads\cmyk_test_file.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 1024x768+0+0
  Resolution: 72x72
  Print size: 14.2222x10.6667
  Units: PixelsPerInch
  Type: ColorSeparation
  Endianess: Undefined
  Colorspace: CMYK
  Depth: 8-bit
  Channel depth:
    cyan: 8-bit
    magenta: 8-bit
    yellow: 8-bit
    black: 8-bit
  Channel statistics:
    Pixels: 786432
    Cyan:
      min: 0 (0)
      max: 255 (1)
{and so on}
In your v7, what says it is Grayscale?

Re: False Grayscale detection for CMYK image

Posted: 2017-08-04T08:47:57-07:00
by Roman80
When you call SetImageGray() it returns as Grayscale, and this is wrong. I narrowed it down to the function IsPixelGray(). See my first post

Regards
Roman