Page 1 of 1

tiff conversion incorrect colors

Posted: 2015-12-11T09:23:20-07:00
by rlyrllm
When I try to convert some tif files, the resulting file isn't correct, the colour is half white and half blue (watermark layer?).

https://imgur.com/X5l4mPp

If I run

Code: Select all

mogrify -format jpg *.tif
I get warnings like "Incompatible type for "RichTIFFIPTC"; tag ignored"

If I run

Code: Select all

identify -verbose
I get
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 4042x3098+0+0
Resolution: 600x600
Print size: 6.73667x5.16333
Units: PixelsPerInch
Type: ColorSeparation
Base type: ColorSeparation
Endianess: MSB
Colorspace: CMYK
Depth: 8-bit
Channel depth:
cyan: 8-bit
magenta: 8-bit
yellow: 1-bit
black: 8-bit
Channel statistics:
Cyan:
min: 0 (0)
max: 247 (0.968627)
mean: 40.1173 (0.157323)
standard deviation: 49.7302 (0.19502)
kurtosis: 0.7733
skewness: 1.20375
Magenta:
min: 0 (0)
max: 251 (0.984314)
mean: 40.1214 (0.157339)
standard deviation: 49.7306 (0.195022)
kurtosis: 0.773151
skewness: 1.20363
Yellow:
min: 0 (0)
max: 0 (0)
mean: 0 (0)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Black:
min: 0 (0)
max: 242 (0.94902)
mean: 32.8699 (0.128902)
standard deviation: 50.146 (0.196651)
kurtosis: 2.14941
skewness: 1.89697
Image statistics:
Overall:
min: 0 (0)
max: 251 (0.984314)
mean: 28.2772 (0.110891)
standard deviation: 43.1881 (0.169365)
kurtosis: 4.35095
skewness: 2.25456
Total ink density: 253%
Rendering intent: Undefined
Gamma: 1
Interlace: None
Background color: cmyk(255,255,255,0)
Border color: cmyk(223,223,223,0)
Matte color: cmyk(189,189,189,0)
Transparent color: cmyk(0,0,0,0)
Compose: Over
Page geometry: 4042x3098+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: TopLeft
Properties:
aux:ApproximateFocusDistance: 62/100
aux:Firmware: 2.1.2
aux:FlashCompensation: 0/1
aux:ImageNumber: 0
aux:Lens: EF24-70mm f/2.8L USM
aux:LensID: 230
aux:LensInfo: 24/1 70/1 0/0 0/0
crs:AlreadyApplied: True
crs:AutoLateralCA: 1
crs:AutoWhiteVersion: 134348800
crs:Blacks2012: 0
crs:BlueHue: 0
crs:BlueSaturation: 0
crs:CameraProfile: Adobe Standard
crs:Clarity2012: 0
crs:ColorNoiseReduction: 25
crs:ColorNoiseReductionDetail: 50
crs:ColorNoiseReductionSmoothness: 50
crs:Contrast2012: 0
crs:ConvertToGrayscale: False
crs:DefringeGreenAmount: 0
crs:DefringeGreenHueHi: 60
crs:DefringeGreenHueLo: 40
crs:DefringePurpleAmount: 0
crs:DefringePurpleHueHi: 70
crs:DefringePurpleHueLo: 30
crs:Exposure2012: 0.00
crs:GrainAmount: 0
crs:GreenHue: 0
crs:GreenSaturation: 0
crs:HasCrop: False
crs:HasSettings: True
crs:Highlights2012: 0
crs:HueAdjustmentAqua: 0
crs:HueAdjustmentBlue: 0
crs:HueAdjustmentGreen: 0
crs:HueAdjustmentMagenta: 0
crs:HueAdjustmentOrange: 0
crs:HueAdjustmentPurple: 0
crs:HueAdjustmentRed: 0
crs:HueAdjustmentYellow: 0
crs:LensManualDistortionAmount: 0
crs:LensProfileChromaticAberrationScale: 100
crs:LensProfileDigest: E54C41E7B7D49594FF5E60B650754194
crs:LensProfileDistortionScale: 100
crs:LensProfileEnable: 1
crs:LensProfileFilename: Canon EOS-1Ds Mark III (Canon EF 24-70mm f2.8 L USM) - RAW.lcp
crs:LensProfileName: Adobe (Canon EF 24-70mm f/2.8 L USM)
crs:LensProfileSetup: LensDefaults
crs:LensProfileVignettingScale: 100
crs:LuminanceAdjustmentAqua: 0
crs:LuminanceAdjustmentBlue: 0
crs:LuminanceAdjustmentGreen: 0
crs:LuminanceAdjustmentMagenta: 0
crs:LuminanceAdjustmentOrange: 0
crs:LuminanceAdjustmentPurple: 0
crs:LuminanceAdjustmentRed: 0
crs:LuminanceAdjustmentYellow: 0
crs:LuminanceSmoothing: 0
crs:ParametricDarks: 0
crs:ParametricHighlights: 0
crs:ParametricHighlightSplit: 75
crs:ParametricLights: 0
crs:ParametricMidtoneSplit: 50
crs:ParametricShadows: 0
crs:ParametricShadowSplit: 25
crs:PerspectiveAspect: 0
crs:PerspectiveHorizontal: 0
crs:PerspectiveRotate: 0.0
crs:PerspectiveScale: 100
crs:PerspectiveUpright: 0
crs:PerspectiveVertical: 0
crs:PostCropVignetteAmount: 0
crs:ProcessVersion: 6.7
crs:RedHue: 0
crs:RedSaturation: 0
crs:Saturation: 0
crs:SaturationAdjustmentAqua: 0
crs:SaturationAdjustmentBlue: 0
crs:SaturationAdjustmentGreen: 0
crs:SaturationAdjustmentMagenta: 0
crs:SaturationAdjustmentOrange: 0
crs:SaturationAdjustmentPurple: 0
crs:SaturationAdjustmentRed: 0
crs:SaturationAdjustmentYellow: 0
crs:Shadows2012: 0
crs:ShadowTint: 0
crs:SharpenDetail: 25
crs:SharpenEdgeMasking: 0
crs:SharpenRadius: +1.0
crs:Sharpness: 25
crs:SplitToningBalance: 0
crs:SplitToningHighlightHue: 0
crs:SplitToningHighlightSaturation: 0
crs:SplitToningShadowHue: 0
crs:SplitToningShadowSaturation: 0
crs:Temperature: 5100
crs:Tint: +10
crs:ToneCurveName: Linear
crs:ToneCurveName2012: Linear
crs:Version: 8.7
crs:Vibrance: 0
crs:VignetteAmount: 0
crs:WhiteBalance: Custom
crs:Whites2012: 0
date:create: 2015-12-11T15:55:21+01:00
date:modify: 2015-10-15T17:48:36+02:00
dc:format: image/tiff
exif:ApertureValue: 6.64386
exif:CustomRendered: 0
exif:DateTimeDigitized: 2015:10:09 14:54:54
exif:DateTimeOriginal: 2015:10:09 14:54:54
exif:ExposureBiasValue: 0
exif:ExposureMode: 1
exif:ExposureProgram: 1
exif:ExposureTime: 0.00625
exif:Flash: 16
exif:FNumber: 10
exif:FocalLength: 55
exif:FocalPlaneResolutionUnit: 2
exif:FocalPlaneXResolution: 3849.21
exif:FocalPlaneYResolution: 3908.14
exif:ISOSpeedRatings: 1
exif:MaxApertureValue: 3
exif:MeteringMode: 5
exif:PixelXDimension: 4042
exif:PixelYDimension: 3098
exif:SceneCaptureType: 0
exif:ShutterSpeedValue: 7.32193
exif:SubSecTimeDigitized: 78
exif:SubSecTimeOriginal: 78
exif:WhiteBalance: 1
photoshop:ColorMode: 4
photoshop:DateCreated: 2015-10-09T14:54:54.078
photoshop:ICCProfile: ISO Coated v2 (ECI)
rdf:Bag:
tiff:endian: lsb
tiff:make: Canon
tiff:model: Canon EOS 5D Mark II
tiff:photometric: separated
tiff:rows-per-strip: 259
tiff:software: Adobe Photoshop CS5 Macintosh
tiff:timestamp: 2015:10:13 10:42:42
xmp:CreateDate: 2015-10-09T14:54:54.78
xmp:CreatorTool: Adobe Photoshop CS5 Macintosh
xmp:MetadataDate: 2015-10-13T10:42:42+02:00
xmp:ModifyDate: 2015-10-13T10:42:42+02:00
Profiles:
Profile-8bim: 11572 bytes
Profile-icc: 1829077 bytes
Description: ISO Coated v2 (ECI)
Manufacturer: ISO Coated v2 (ECI)
Model: ISO Coated v2 (ECI)
Profile-xmp: 25885 bytes
Artifacts:
filename: 265038905.tif
verbose: true
Tainted: False
Filesize: 37.26MB
Number pixels: 12.52M
Pixels per second: 6.843MB
User time: 1.810u
Elapsed time: 0:02.829
Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org
If I run it on other tif files there is no problem.

Do you have any suggestions on how to solve this?

Re: tiff conversion incorrect colors

Posted: 2015-12-11T11:22:38-07:00
by fmw42
Your file is CMYK JPG, so you need to convert to sRGB first

try

Code: Select all

mogrify -format jpg -colorspace sRGB *.tif
or use profiles to convert between colorspaces.

Please always provide your IM version and platform, since syntax and scripting differ as well as function changes.

Re: tiff conversion incorrect colors

Posted: 2015-12-11T12:31:03-07:00
by rlyrllm
Any way to convert it from CMYK tiff to CMYK jpg?

Version: ImageMagick 6.7.7-10 2014-03-06 Q16

Platform: Ubuntu 14.04

Re: tiff conversion incorrect colors

Posted: 2015-12-11T13:13:33-07:00
by fmw42
The file I downloaded was JPG. How do I get to your TIFF file to download? Perhaps your post got changed to JPG when uploading? Can you post the TIFF to dropbox.com and put the URL here, so I can test with it.

Your verbose information for the TIFF shows a CMYK profile, which should carry over to the output JPG. If not, you can add the CMYK profile. But you would have test each image to be know whether to decide whether the input is sRGB or CMYK. But some browsers and viewers do not display CMYK properly. So it is usually better to convert to sRGB (especially with profiles for best color conversion).

IM 6.7.7.10 was a release when IM was undergoing significant colorspace changes. I would urge you to upgrade to the latest IM version. It could be a colorspace or linear vs non-linear color or grayscale issue.

Re: tiff conversion incorrect colors

Posted: 2015-12-14T02:16:40-07:00
by rlyrllm
Thanks for the detailed and clear response. Yes, it was due to the version difference.

So when I used apt-get on ubuntu it installed that version in my post, not the latest one.

I followed this post to upgrade it

http://askubuntu.com/questions/267746/h ... -compiling

Thanks also for the suggestion regarding CMYK and sRGB.