The color is different

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
guangzhe_yue
Posts: 6
Joined: 2016-03-21T00:11:24-07:00
Authentication code: 1151

The color is different

Post by guangzhe_yue » 2016-03-21T05:40:59-07:00

Hello,

I've generated image using the command "convert 1.tif[1] 1.png",but the color of these files is different.

What's wrong with my operation ? Thanks !

Files in this url:
http://pan.baidu.com/s/1nuobAwp

snibgo
Posts: 12429
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: The color is different

Post by snibgo » 2016-03-21T06:50:21-07:00

I couldn't download from that site. Please post the result of "identify 1.tif[]". I suspect the image is in a format such as CMYK that can't be stored in PNG, so it is converted.
snibgo's IM pages: im.snibgo.com

guangzhe_yue
Posts: 6
Joined: 2016-03-21T00:11:24-07:00
Authentication code: 1151

Re: The color is different

Post by guangzhe_yue » 2016-03-21T20:22:06-07:00

snibgo wrote:I couldn't download from that site. Please post the result of "identify 1.tif[]". I suspect the image is in a format such as CMYK that can't be stored in PNG, so it is converted.

Code: Select all

D:\>identify 1.tif[1]
1.tif[1]=>1.tif TIFF 843x554 843x554+0+0 8-bit CMYK 0.000u 0:00.000
identify.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNorma
lTag' @ warning/tiff.c/TIFFWarnings/891.
identify.exe: Incompatible type for "FileSource"; tag ignored. `TIFFFetchNormalT
ag' @ warning/tiff.c/TIFFWarnings/891.
identify.exe: Incompatible type for "SceneType"; tag ignored. `TIFFFetchNormalTa
g' @ warning/tiff.c/TIFFWarnings/891.
identify.exe: Wrong data type 3 for "GainControl"; tag ignored. `TIFFReadCustomD
irectory' @ warning/tiff.c/TIFFWarnings/891.
identify.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNorma
lTag' @ warning/tiff.c/TIFFWarnings/891.

snibgo
Posts: 12429
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: The color is different

Post by snibgo » 2016-03-21T20:28:25-07:00

Sorry, I meant "identify -verbose 1.tif[1]".

But even without "-verbose", we see your tiff file is CMYK. So how are you viewing it?
snibgo's IM pages: im.snibgo.com

guangzhe_yue
Posts: 6
Joined: 2016-03-21T00:11:24-07:00
Authentication code: 1151

Re: The color is different

Post by guangzhe_yue » 2016-03-21T20:44:31-07:00

snibgo wrote:Sorry, I meant "identify -verbose 1.tif[1]".

But even without "-verbose", we see your tiff file is CMYK. So how are you viewing it?

Code: Select all

Image: 1.tif
  Base filename: 1.tif
  Format: TIFF (Tagged Image File Format)
  Mime type: image/tiff
  Class: DirectClass
  Geometry: 843x554+0+0
  Resolution: 300x300
  Print size: 2.81x1.84667
  Units: PixelsPerInch
  Type: ColorSeparationAlpha
  Endianess: LSB
  Colorspace: CMYK
  Depth: 8-bit
  Channel depth:
    cyan: 8-bit
    magenta: 8-bit
    yellow: 8-bit
    black: 8-bit
    alpha: 8-bit
  Channel statistics:
    Pixels: 467022
    Cyan:
      min: 1 (0.00392157)
      max: 231 (0.905882)
      mean: 91.4922 (0.358793)
      standard deviation: 72.7575 (0.285324)
      kurtosis: -1.4848
      skewness: -0.151638
      entropy: 0.713467
    Magenta:
      min: 1 (0.00392157)
      max: 221 (0.866667)
      mean: 72.6698 (0.28498)
      standard deviation: 60.7786 (0.238347)
      kurtosis: -1.22706
      skewness: 0.123113
      entropy: 0.71917
    Yellow:
      min: 1 (0.00392157)
      max: 219 (0.858824)
      mean: 72.397 (0.28391)
      standard deviation: 59.8375 (0.234657)
      kurtosis: -1.25146
      skewness: 0.0786413
      entropy: 0.715167
    Black:
      min: 1 (0.00392157)
      max: 209 (0.819608)
      mean: 11.3512 (0.0445147)
      standard deviation: 29.8216 (0.116948)
      kurtosis: 12.8499
      skewness: 3.5281
      entropy: 0.265611
    Alpha:
      min: 0 (0)
      max: 255 (1)
      mean: 165.047 (0.647242)
      standard deviation: 121.59 (0.476822)
      kurtosis: -1.61664
      skewness: 0.6163
      entropy: 0.134474
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 67.5727 (0.264991)
      standard deviation: 75.1553 (0.294727)
      kurtosis: 0.563977
      skewness: 1.1146
      entropy: 0.509578
  Total ink density: 341.961%
  Alpha: cmyka(1,1,1,1,0)   #0101010100
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: cmyka(255,255,255,0,1)
  Border color: cmyka(223,223,223,0,1)
  Matte color: cmyka(189,189,189,0,1)
  Transparent color: cmyka(0,0,0,0,0)
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 843x554+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: RLE
  Orientation: TopLeft
  Properties:
    aux:ApproximateFocusDistance: 45/100
    aux:ImageNumber: 17574
    aux:Lens: 18.0-55.0 mm f/3.5-5.6
    aux:LensID: 154
    aux:LensInfo: 180/10 550/10 35/10 56/10
    aux:SerialNumber: 9116274
    crs:AlreadyApplied: True
    date:create: 2016-03-22T11:43:50+08:00
    date:modify: 2016-03-22T11:43:50+08:00
    dc:format: image/tiff
    exif:ApertureValue: 6.33985
    exif:CompressedBitsPerPixel: 4
    exif:Contrast: 0
    exif:CustomRendered: 0
    exif:DateTimeDigitized: 2016:01:28 13:26:47
    exif:DateTimeOriginal: 2016:01:28 13:26:47
    exif:DigitalZoomRatio: 1
    exif:ExposureBiasValue: 0
    exif:ExposureMode: 1
    exif:ExposureProgram: 1
    exif:ExposureTime: 0.008
    exif:Flash: 0
    exif:FNumber: 9
    exif:FocalLength: 24
    exif:FocalLengthIn35mmFilm: 36
    exif:ISOSpeedRatings: 200
    exif:LightSource: 0
    exif:MaxApertureValue: 4
    exif:MeteringMode: 5
    exif:PixelXDimension: 843
    exif:PixelYDimension: 554
    exif:Saturation: 0
    exif:SceneCaptureType: 0
    exif:SensingMethod: 2
    exif:Sharpness: 2
    exif:ShutterSpeedValue: 6.96578
    exif:SubjectDistance: 0.45
    exif:SubjectDistanceRange: 0
    exif:SubSecTime: 00
    exif:SubSecTimeDigitized: 00
    exif:SubSecTimeOriginal: 00
    exif:WhiteBalance: 1
    label: 图层 0
    photoshop:ColorMode: 4
    photoshop:DateCreated: 2016-01-28T13:26:47
    signature: 3c904f4a45962926919e96d5d03dc539a3d475d67b75fc34f0e84b07639bddc1
    stRef:documentID: xmp.did:6AAC079264D8E511B5C2C22AD5B25C57
    stRef:instanceID: xmp.iid:6AAC079264D8E511B5C2C22AD5B25C57
    stRef:originalDocumentID: xmp.did:6AAC079264D8E511B5C2C22AD5B25C57
    tiff:alpha: associated
    tiff:endian: lsb
    tiff:make: NIKON CORPORATION
    tiff:model: NIKON D5000
    tiff:photometric: separated
    tiff:rows-per-strip: 1
    tiff:software: Adobe Photoshop CS5 Windows
    tiff:timestamp: 2016:02:26 09:27:39
    xmp:CreateDate: 2016-01-28T13:26:47.00+08:00
    xmp:CreatorTool: Adobe Photoshop CS5 Windows
    xmp:MetadataDate: 2016-02-26T09:27:39+08:00
    xmp:ModifyDate: 2016-02-26T09:27:39+08:00
    xmpMM:DocumentID: xmp.did:6AAC079264D8E511B5C2C22AD5B25C57
    xmpMM:InstanceID: xmp.iid:94030AF127DCE511A6EEB50A10268964
    xmpMM:OriginalDocumentID: xmp.did:6AAC079264D8E511B5C2C22AD5B25C57
  Profiles:
    Profile-8bim: 9856 bytes
    Profile-xmp: 16964 bytes
  Artifacts:
    filename: 1.tif[1]
    psd:layer.opacity: 0
    psd:layer.x: 0
    psd:layer.y: 0
    tiff:has-layers: true
    verbose: true
  Tainted: False
  Filesize: 0B
  Number pixels: 467K
  Pixels per second: 233.4MB
  User time: 0.047u
  Elapsed time: 0:01.002
  Version: ImageMagick 6.9.3-7 Q16 x64 2016-03-06 http://www.imagemagick.org
Thanks!

snibgo
Posts: 12429
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: The color is different

Post by snibgo » 2016-03-21T21:25:04-07:00

The file contains "Profile-8bim", which is from Photoshop. This may contain colour transfer functions, which ImageMagick doesn't read. Assigning a CMYK profile, then converting to an sRGB profile, might make the image look similar or even identical to how it appears in Photoshop.
snibgo's IM pages: im.snibgo.com

guangzhe_yue
Posts: 6
Joined: 2016-03-21T00:11:24-07:00
Authentication code: 1151

Re: The color is different

Post by guangzhe_yue » 2016-03-21T22:27:35-07:00

snibgo wrote:The file contains "Profile-8bim", which is from Photoshop. This may contain colour transfer functions, which ImageMagick doesn't read. Assigning a CMYK profile, then converting to an sRGB profile, might make the image look similar or even identical to how it appears in Photoshop.
OK,Thank You !

Post Reply