Converting anything to RGB correctly
-
- Posts: 10
- Joined: 2017-05-08T11:12:41-07:00
- Authentication code: 1151
Re: Converting anything to RGB correctly
Wow, quick reply
I have downloaded the latest version - ImageMagick v7.0.5.5. The file used for installation is: ImageMagick-7.0.5-5-Q16-HDRI-x64-dll.exe - on a Windows 7 x64 SP1 pro.
When opening the .DNG file (in the ZIP file listed above), Photoshop CC shows "Adobe RGB (1998)". I have tried just about all variants which I can find, and it doesn't seem to make any difference which one(s) I use. The DNG file is from my iPhone 7+, not altered in any way.
I have downloaded the latest version - ImageMagick v7.0.5.5. The file used for installation is: ImageMagick-7.0.5-5-Q16-HDRI-x64-dll.exe - on a Windows 7 x64 SP1 pro.
When opening the .DNG file (in the ZIP file listed above), Photoshop CC shows "Adobe RGB (1998)". I have tried just about all variants which I can find, and it doesn't seem to make any difference which one(s) I use. The DNG file is from my iPhone 7+, not altered in any way.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Converting anything to RGB correctly
I am trying to install ufraw delegate right now so that I can test your dng file. I will get back to you shortly. I am not an expert on DNG files, so anyone else can test and explain if they want.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Converting anything to RGB correctly
Sorry, I cannot get anything better. My results are darker just like yours. I tried both Adobe RGB and sRGB profiles to convert to png. Perhaps some expert on DNG format might be able to help.
Photoshop can use spot colors and dot gain. ImageMagick cannot not. I do not know if this is pertinent or not.
Photoshop can use spot colors and dot gain. ImageMagick cannot not. I do not know if this is pertinent or not.
-
- Posts: 10
- Joined: 2017-05-08T11:12:41-07:00
- Authentication code: 1151
Re: Converting anything to RGB correctly
Well, I really do appreciate you trying
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting anything to RGB correctly
The only difference I can see is in lightness. Is there something else?
IM uses dcraw or ufraw to read the DNG. "-verbose" will tell you which your system uses. Both of those delegates have various options, which might get a result closer to that from Photoshop.
IM uses dcraw or ufraw to read the DNG. "-verbose" will tell you which your system uses. Both of those delegates have various options, which might get a result closer to that from Photoshop.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Converting anything to RGB correctly
The pixel data is identical.
0 (0)
So the issue is in the viewing profile or other meta data related to viewing.
Code: Select all
magick dng:test.dng test.png
magick compare -metric rmse dng:test.dng test.png null:
So the issue is in the viewing profile or other meta data related to viewing.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting anything to RGB correctly
Yes, but that test is limited to comparing IM (via "magick") with IM (via "magick compare"). Hardly surprisingly, they give the same result.fmw42 wrote:The pixel data is identical.
Some experiments using dcraw directly (not via IM) gives results more like the "notok.jpg" result. The transformation from that to "ok.jpg" doesn't seem to be a linear multiplier, not a power relationship. The difference in lightness is more than I would expect from a AdobeRGB1998/sRGB confusion (EDIT but less than a RGB/sRGB confusion).
snibgo's IM pages: im.snibgo.com
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting anything to RGB correctly
Ah.. I think I've found the difference.
The "notok.jpg" image is very close to the thumbnail in the DNG, rather than the raw image.
IM will always extract the raw image, not the smaller, lower bit-depth, thumbnail. If you prefer the thumbnail, you'll need to use dcraw or similar.
The "notok.jpg" image is very close to the thumbnail in the DNG, rather than the raw image.
IM will always extract the raw image, not the smaller, lower bit-depth, thumbnail. If you prefer the thumbnail, you'll need to use dcraw or similar.
snibgo's IM pages: im.snibgo.com
Re: Converting anything to RGB correctly
Hello All -
Thank you in advance for your assistance!
I am also a printer (like other posters here), and we have a website that customers upload files to (we accept Jpeg, PNG, TIFF, and PNG file formats). When we receive the file we make a thumbnail version and display that version in the browser for the customer to scale/crop/rotate etc. We then take that data and use it to modify the customer uploaded file via a worker queue. That process consists of taking a file and placing it into a PDF generated by TCPDF (a php library for making PDFs), however due to memory problems, we are scrapping that process and planning to write all the image processing with IM. While recoding this it came to our attention we need to handle the color management properly, so I found this thread, but would like to get some clarification to make sure we are using the IM process the same way we process images in Photoshop.
Here is what we do in Photoshop:
1) Open image and view ICC profile
IF Photoshop says the image does not have an embedded ICC Profile, we assume and ASSIGN the profiles as follows:
2) Using the "Convert" function in Photoshop to convert the ICC profile associated with the file to AdobeRGB1998 using the Adobe Color Engine (ACE) and the rendering intent of Relative Colormetric with Blackpoint compensation.
3) Save the file as a high quality Tiff or Jpeg and make sue we EMBED the ICC Profile
So, now my question is, will the referenced script for this thread handle the needs we have (checking to see if an ICC profile is assigned, IF NOT assigning a specific profile for either RGB or CMYK, then CONVERTING (IE changing the actual CMYK/RGB numbers in a file) using the correct rendering intent to ensure color appearance is preserved as much/as closely as possible?
If no, what changes would I need to do to the script to match the color management process we currently follow?
Thank you in advance for your assistance!
I am also a printer (like other posters here), and we have a website that customers upload files to (we accept Jpeg, PNG, TIFF, and PNG file formats). When we receive the file we make a thumbnail version and display that version in the browser for the customer to scale/crop/rotate etc. We then take that data and use it to modify the customer uploaded file via a worker queue. That process consists of taking a file and placing it into a PDF generated by TCPDF (a php library for making PDFs), however due to memory problems, we are scrapping that process and planning to write all the image processing with IM. While recoding this it came to our attention we need to handle the color management properly, so I found this thread, but would like to get some clarification to make sure we are using the IM process the same way we process images in Photoshop.
Here is what we do in Photoshop:
1) Open image and view ICC profile
IF Photoshop says the image does not have an embedded ICC Profile, we assume and ASSIGN the profiles as follows:
- RGB = sRGB IEC61966-2.1 (since this is the default RGB color profile for North American General Purpose 2 and that is what Adobe sets as default for the default color settings in the US).
- CMYK = U.S. Web Coated (SWOP) v2 (same reasoning as above).
2) Using the "Convert" function in Photoshop to convert the ICC profile associated with the file to AdobeRGB1998 using the Adobe Color Engine (ACE) and the rendering intent of Relative Colormetric with Blackpoint compensation.
3) Save the file as a high quality Tiff or Jpeg and make sue we EMBED the ICC Profile
So, now my question is, will the referenced script for this thread handle the needs we have (checking to see if an ICC profile is assigned, IF NOT assigning a specific profile for either RGB or CMYK, then CONVERTING (IE changing the actual CMYK/RGB numbers in a file) using the correct rendering intent to ensure color appearance is preserved as much/as closely as possible?
If no, what changes would I need to do to the script to match the color management process we currently follow?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting anything to RGB correctly
Yes, you can do that with ImageMagick.
The command-line options you need are:
-profile which assigns and embeds a profile if one isn't already embedded, or converts the pixels and replaces the embedded if there is already an embedded pofile.
-intent set this before the "-profile" for a specific intent.
-black-point-compensation likewise before "-profile".
See http://www.imagemagick.org/script/comma ... ptions.php for command-line options.
"-format %[colorspace]" says what the colorspace is (eg sRGB, CMYK).
"-format %[profile:ICC]" will list any embedded ICC profiles.
See http://www.imagemagick.org/script/escape.php for formats.
Be aware that saving as JPEG with ImageMagck is always lossy, even if the input was JPEG.
The command-line options you need are:
-profile which assigns and embeds a profile if one isn't already embedded, or converts the pixels and replaces the embedded if there is already an embedded pofile.
-intent set this before the "-profile" for a specific intent.
-black-point-compensation likewise before "-profile".
See http://www.imagemagick.org/script/comma ... ptions.php for command-line options.
"-format %[colorspace]" says what the colorspace is (eg sRGB, CMYK).
"-format %[profile:ICC]" will list any embedded ICC profiles.
See http://www.imagemagick.org/script/escape.php for formats.
Be aware that saving as JPEG with ImageMagck is always lossy, even if the input was JPEG.
I don't know which script you mean. This thread is old, and uses IM v6 syntax ("convert ..."). I strongly suggest you use v7 ("magick ...").DSGI wrote:...will the referenced script for this thread handle the needs we have...
snibgo's IM pages: im.snibgo.com
Re: Converting anything to RGB correctly
I am referring to the script at:I don't know which script you mean. This thread is old, and uses IM v6 syntax ("convert ..."). I strongly suggest you use v7 ("magick ...").
http://www.imagemagick.org/Usage/script ... t_any2srgb
I am a little confused, I thought sRGB was/is a profile NOT a COLORSPACE... So I would expect to see just RGB for the -format %[COLORSPACE] flag and sRGB for the -format %[profile:ICC] ?"-format %[colorspace]" says what the colorspace is (eg sRGB, CMYK).
"-format %[profile:ICC]" will list any embedded ICC profiles.
Can you provide an example command that has the rendering intent component and uses magic vs. convert since all the examples in this thread use "convert"?
Thanks for the response!
Matthew
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting anything to RGB correctly
I don't use that script, and haven't tested it to see if it meets your needs.
To IM, "sRGB" is a colorspace. Also, many profiles are sRGB.
IM's concepts and terminology don't exactly match what other people use, partly because IM was developed before the concepts and terminology became common and useful.
A colour model should specify in general terms what each channel represents, eg RGB or HSV or L*a*b* or CMYK, etc. IM doesn't use this term.
A colour space goes further, and should describe the colour created by any given tuple, defined colorimetrically. Examples: sRGB, AdobeRGB. This is also what IM calls a colorspace, in the sense that IM has builtin conversions between its colorspaces and CIEXYZ. IM examples: sRGB, RGB (which is sRGB but without the gamma transformation), XYZ, Lab. For a complete list, see "magick -list colorspace". IM doesn't have inbuilt transformations to/from AdobeRGB, Rec2020 or other common colorspaces.
A colour profile may be specific to a device or family of input or output devices, and it specifies the colorimetric meaning of tuples created by the device, or used by the device. It does this by defining the arithmetic transformation between the device space and a standard colour space (which is usually CIEXYZ or CIELab). A colour profile can also specify the colorimetry of an image, by giving the transformation to and from a standard.
Annoyingly, there are a number of versions of the "standard" sRGB, all slightly different. If we need exact results, we should embed the appropriate profile.
There is no equivalent "standard" CMYK, so a profile should always be embedded.
Take the "rose" image (which has no embedded profile) and assign a profile from an ICC file:
Assign an sRGB profile, and convert to a CMYK profile, with perceptual intent:
"magick -list intent" lists the four possible intents. But not all profiles support all four intents, and IM won't tell you which are supported.
To IM, "sRGB" is a colorspace. Also, many profiles are sRGB.
IM's concepts and terminology don't exactly match what other people use, partly because IM was developed before the concepts and terminology became common and useful.
A colour model should specify in general terms what each channel represents, eg RGB or HSV or L*a*b* or CMYK, etc. IM doesn't use this term.
A colour space goes further, and should describe the colour created by any given tuple, defined colorimetrically. Examples: sRGB, AdobeRGB. This is also what IM calls a colorspace, in the sense that IM has builtin conversions between its colorspaces and CIEXYZ. IM examples: sRGB, RGB (which is sRGB but without the gamma transformation), XYZ, Lab. For a complete list, see "magick -list colorspace". IM doesn't have inbuilt transformations to/from AdobeRGB, Rec2020 or other common colorspaces.
A colour profile may be specific to a device or family of input or output devices, and it specifies the colorimetric meaning of tuples created by the device, or used by the device. It does this by defining the arithmetic transformation between the device space and a standard colour space (which is usually CIEXYZ or CIELab). A colour profile can also specify the colorimetry of an image, by giving the transformation to and from a standard.
Annoyingly, there are a number of versions of the "standard" sRGB, all slightly different. If we need exact results, we should embed the appropriate profile.
There is no equivalent "standard" CMYK, so a profile should always be embedded.
Take the "rose" image (which has no embedded profile) and assign a profile from an ICC file:
Code: Select all
magick rose: -profile sRGB.icc out1.jpg
Code: Select all
magick rose: -profile sRGB.icc -intent perceptual -profile USWebUncoated.icc out1.jpg
snibgo's IM pages: im.snibgo.com
Re: Converting anything to RGB correctly
Hi, experts
I got unexpected result when converting a CMYK jpg image (without embeded icc profile) to RGB "colorspace". The result image looks more brighter and contraster;
Command I used:
magick [my jpg image] -profile [path to cmyk]/JapanColor2001Coated.icc -profile [path to RGB]/sRGB2014.icc dest.jpg
ImageMagic information:
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-04-12 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): freetype jng jpeg lcms png tiff zlib
OS information:
Linux dev-server 4.16.0-1.el7.elrepo.x86_64 #1 SMP Sun Apr 1 20:13:35 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
I read through this and other related thread about this topic, it seems that it's possible to get right image in case of none embeded icc profile in CMYK image. But I always failed to achived this.
Detail my orginal image:
----------------------------------
Image: HB-YJ-2018-00008-00000.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 4896x3264+0+0
Resolution: 300x300
Print size: 16.32x10.88
Units: PixelsPerInch
Colorspace: CMYK
Type: ColorSeparation
Base type: Undefined
Endianess: Undefined
Depth: 8-bit
Channel depth:
Cyan: 8-bit
Magenta: 8-bit
Yellow: 8-bit
Black: 8-bit
Channel statistics:
Pixels: 15980544
Cyan:
min: 0 (0)
max: 255 (1)
mean: 137.83 (0.540508)
standard deviation: 66.1699 (0.25949)
kurtosis: -1.12427
skewness: -0.323659
entropy: 0.973651
Magenta:
min: 0 (0)
max: 255 (1)
mean: 85.154 (0.333937)
standard deviation: 50.7867 (0.199163)
kurtosis: -0.743278
skewness: 0.191119
entropy: 0.931994
Yellow:
min: 0 (0)
max: 255 (1)
mean: 98.5123 (0.386323)
standard deviation: 74.0423 (0.290362)
kurtosis: -1.26027
skewness: 0.340287
entropy: 0.970621
Black:
min: 0 (0)
max: 242 (0.94902)
mean: 75.3269 (0.2954)
standard deviation: 73.9198 (0.289882)
kurtosis: -1.00561
skewness: 0.62261
entropy: 0.859446
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 99.2057 (0.389042)
standard deviation: 66.2297 (0.259724)
kurtosis: -1.1696
skewness: 0.249972
entropy: 0.933928
Total ink density: 338.431%
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)
Matte color: grey74
Background color: white
Border color: srgb(223,223,223)
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 4896x3264+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 99
Orientation: TopLeft
Properties:
date:create: 2018-04-11T13:05:33+08:00
date:modify: 2018-04-11T13:05:33+08:00
exif:ApertureValue: 483328/65536
exif:BitsPerSample: 8, 8, 8
exif:ColorSpace: 65535
exif:ComponentsConfiguration: 1, 2, 3, 0
exif:CustomRendered: 0
exif:DateTime: 2017:09:22 11:43:31
exif:DateTimeDigitized: 2013:06:21 12:00:41
exif:DateTimeOriginal: 2013:06:21 12:00:41
exif:ExifImageLength: 3264
exif:ExifImageWidth: 4896
exif:ExifOffset: 308
exif:ExifVersion: 48, 50, 50, 49
exif:ExposureBiasValue: 0/1
exif:ExposureMode: 0
exif:ExposureProgram: 2
exif:ExposureTime: 1/640
exif:Flash: 16
exif:FlashPixVersion: 48, 49, 48, 48
exif:FNumber: 13/1
exif:FocalLength: 32/1
exif:FocalPlaneResolutionUnit: 2
exif:FocalPlaneXResolution: 4896000/1290
exif:FocalPlaneYResolution: 3264000/836
exif:GPSInfo: 1052
exif:GPSVersionID: 2, 2, 0, 0
exif:ImageLength: 3264
exif:ImageWidth: 4896
exif:ISOSpeedRatings: 400
exif:Make: Canon
exif:MaxApertureValue: 3/1
exif:MeteringMode: 3
exif:Model: Canon EOS-1D Mark IV
exif:Orientation: 1
exif:PhotometricInterpretation: 2
exif:ResolutionUnit: 2
exif:SamplesPerPixel: 3
exif:SceneCaptureType: 0
exif:ShutterSpeedValue: 614400/65536
exif:Software: Adobe Photoshop CS5.1 Macintosh
exif:SubSecTime: 69
exif:SubSecTimeDigitized: 69
exif:SubSecTimeOriginal: 69
exif:thumbnail:Compression: 6
exif:thumbnail:JPEGInterchangeFormat: 1166
exif:thumbnail:JPEGInterchangeFormatLength: 5182
exif:thumbnail:ResolutionUnit: 2
exif:thumbnail:XResolution: 72/1
exif:thumbnail:YResolution: 72/1
exif:UserComment: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
exif:WhiteBalance: 0
exif:XResolution: 3000000/10000
exif:YCbCrPositioning: 2
exif:YResolution: 3000000/10000
jpeg:colorspace: 4
jpeg:sampling-factor: 1x1,1x1,1x1,1x1
signature: 68f66921a9089f1cda15f6985b73e5f49c54ec0ad7b2356f3e75e380c0b0dbfe
Profiles:
Profile-8bim: 7412 bytes
Profile-exif: 6354 bytes
Profile-iptc: 84 bytes
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
unknown[2,0]:
Created Date[2,55]: 20130621
Created Time[2,60]: 120041+0000
Profile-xmp: 4063 bytes
Artifacts:
verbose: true
Tainted: False
Filesize: 20.1333MiB
Number pixels: 15.9805M
Pixels per second: 16.4748MB
User time: 0.960u
Elapsed time: 0:01.969
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-04-12 http://www.imagemagick.org
----------------------------------------------------------
Detail my result image:
======================
Image: dest.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 4896x3264+0+0
Resolution: 300x300
Print size: 16.32x10.88
Units: PixelsPerInch
Colorspace: sRGB
Type: TrueColor
Base type: Undefined
Endianess: Undefined
Depth: 8-bit
Channel depth:
Red: 8-bit
Green: 8-bit
Blue: 8-bit
Channel statistics:
Pixels: 15980544
Red:
min: 0 (0)
max: 255 (1)
mean: 108.275 (0.424607)
standard deviation: 79.9685 (0.313602)
kurtosis: -1.30956
skewness: 0.152824
entropy: 0.949478
Green:
min: 0 (0)
max: 255 (1)
mean: 129.899 (0.509407)
standard deviation: 72.909 (0.285917)
kurtosis: -1.26105
skewness: 0.0263701
entropy: 0.981494
Blue:
min: 0 (0)
max: 255 (1)
mean: 131.301 (0.514904)
standard deviation: 80.5578 (0.315913)
kurtosis: -1.39313
skewness: -0.0591129
entropy: 0.969149
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 123.158 (0.482973)
standard deviation: 77.8117 (0.305144)
kurtosis: -1.31312
skewness: 0.0243738
entropy: 0.966707
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)
Matte color: grey74
Background color: white
Border color: srgb(223,223,223)
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 4896x3264+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 99
Orientation: TopLeft
Properties:
date:create: 2018-04-16T12:43:10+08:00
date:modify: 2018-04-16T12:43:10+08:00
exif:ApertureValue: 483328/65536
exif:BitsPerSample: 8, 8, 8
exif:ColorSpace: 65535
exif:ComponentsConfiguration: 1, 2, 3, 0
exif:CustomRendered: 0
exif:DateTime: 2017:09:22 11:43:31
exif:DateTimeDigitized: 2013:06:21 12:00:41
exif:DateTimeOriginal: 2013:06:21 12:00:41
exif:ExifImageLength: 3264
exif:ExifImageWidth: 4896
exif:ExifOffset: 308
exif:ExifVersion: 48, 50, 50, 49
exif:ExposureBiasValue: 0/1
exif:ExposureMode: 0
exif:ExposureProgram: 2
exif:ExposureTime: 1/640
exif:Flash: 16
exif:FlashPixVersion: 48, 49, 48, 48
exif:FNumber: 13/1
exif:FocalLength: 32/1
exif:FocalPlaneResolutionUnit: 2
exif:FocalPlaneXResolution: 4896000/1290
exif:FocalPlaneYResolution: 3264000/836
exif:GPSInfo: 1052
exif:GPSVersionID: 2, 2, 0, 0
exif:ImageLength: 3264
exif:ImageWidth: 4896
exif:ISOSpeedRatings: 400
exif:Make: Canon
exif:MaxApertureValue: 3/1
exif:MeteringMode: 3
exif:Model: Canon EOS-1D Mark IV
exif:Orientation: 1
exif:PhotometricInterpretation: 2
exif:ResolutionUnit: 2
exif:SamplesPerPixel: 3
exif:SceneCaptureType: 0
exif:ShutterSpeedValue: 614400/65536
exif:Software: Adobe Photoshop CS5.1 Macintosh
exif:SubSecTime: 69
exif:SubSecTimeDigitized: 69
exif:SubSecTimeOriginal: 69
exif:thumbnail:Compression: 6
exif:thumbnail:JPEGInterchangeFormat: 1166
exif:thumbnail:JPEGInterchangeFormatLength: 5182
exif:thumbnail:ResolutionUnit: 2
exif:thumbnail:XResolution: 72/1
exif:thumbnail:YResolution: 72/1
exif:UserComment: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
exif:WhiteBalance: 0
exif:XResolution: 300/1
exif:YCbCrPositioning: 2
exif:YResolution: 300/1
icc Copyright International Color Consortium, 2015
icc:description: sRGB2014
icc:manufacturer: sRGB2014
icc:model: IEC 61966-2-1 Default RGB Colour Space - sRGB
jpeg:colorspace: 2
jpeg:sampling-factor: 1x1,1x1,1x1
signature: ce3c79e46b3011f19280013cf9f9737a225d073216ceb7fc24de6c3e52331780
Profiles:
Profile-8bim: 7412 bytes
Profile-exif: 6354 bytes
Profile-icc: 3024 bytes
Profile-iptc: 84 bytes
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
unknown[2,0]:
Created Date[2,55]: 20130621
Created Time[2,60]: 120041+0000
Profile-xmp: 4063 bytes
Artifacts:
verbose: true
Tainted: False
Filesize: 13.808MiB
Number pixels: 15.9805M
Pixels per second: 24969600B
User time: 0.630u
Elapsed time: 0:01.640
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-04-12 http://www.imagemagick.org
==================================
"dest.jpg" looks obvious different with orginal. I don't know what's I missed...
Thanks for your help.
I got unexpected result when converting a CMYK jpg image (without embeded icc profile) to RGB "colorspace". The result image looks more brighter and contraster;
Command I used:
magick [my jpg image] -profile [path to cmyk]/JapanColor2001Coated.icc -profile [path to RGB]/sRGB2014.icc dest.jpg
ImageMagic information:
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-04-12 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): freetype jng jpeg lcms png tiff zlib
OS information:
Linux dev-server 4.16.0-1.el7.elrepo.x86_64 #1 SMP Sun Apr 1 20:13:35 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
I read through this and other related thread about this topic, it seems that it's possible to get right image in case of none embeded icc profile in CMYK image. But I always failed to achived this.
Detail my orginal image:
----------------------------------
Image: HB-YJ-2018-00008-00000.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 4896x3264+0+0
Resolution: 300x300
Print size: 16.32x10.88
Units: PixelsPerInch
Colorspace: CMYK
Type: ColorSeparation
Base type: Undefined
Endianess: Undefined
Depth: 8-bit
Channel depth:
Cyan: 8-bit
Magenta: 8-bit
Yellow: 8-bit
Black: 8-bit
Channel statistics:
Pixels: 15980544
Cyan:
min: 0 (0)
max: 255 (1)
mean: 137.83 (0.540508)
standard deviation: 66.1699 (0.25949)
kurtosis: -1.12427
skewness: -0.323659
entropy: 0.973651
Magenta:
min: 0 (0)
max: 255 (1)
mean: 85.154 (0.333937)
standard deviation: 50.7867 (0.199163)
kurtosis: -0.743278
skewness: 0.191119
entropy: 0.931994
Yellow:
min: 0 (0)
max: 255 (1)
mean: 98.5123 (0.386323)
standard deviation: 74.0423 (0.290362)
kurtosis: -1.26027
skewness: 0.340287
entropy: 0.970621
Black:
min: 0 (0)
max: 242 (0.94902)
mean: 75.3269 (0.2954)
standard deviation: 73.9198 (0.289882)
kurtosis: -1.00561
skewness: 0.62261
entropy: 0.859446
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 99.2057 (0.389042)
standard deviation: 66.2297 (0.259724)
kurtosis: -1.1696
skewness: 0.249972
entropy: 0.933928
Total ink density: 338.431%
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)
Matte color: grey74
Background color: white
Border color: srgb(223,223,223)
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 4896x3264+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 99
Orientation: TopLeft
Properties:
date:create: 2018-04-11T13:05:33+08:00
date:modify: 2018-04-11T13:05:33+08:00
exif:ApertureValue: 483328/65536
exif:BitsPerSample: 8, 8, 8
exif:ColorSpace: 65535
exif:ComponentsConfiguration: 1, 2, 3, 0
exif:CustomRendered: 0
exif:DateTime: 2017:09:22 11:43:31
exif:DateTimeDigitized: 2013:06:21 12:00:41
exif:DateTimeOriginal: 2013:06:21 12:00:41
exif:ExifImageLength: 3264
exif:ExifImageWidth: 4896
exif:ExifOffset: 308
exif:ExifVersion: 48, 50, 50, 49
exif:ExposureBiasValue: 0/1
exif:ExposureMode: 0
exif:ExposureProgram: 2
exif:ExposureTime: 1/640
exif:Flash: 16
exif:FlashPixVersion: 48, 49, 48, 48
exif:FNumber: 13/1
exif:FocalLength: 32/1
exif:FocalPlaneResolutionUnit: 2
exif:FocalPlaneXResolution: 4896000/1290
exif:FocalPlaneYResolution: 3264000/836
exif:GPSInfo: 1052
exif:GPSVersionID: 2, 2, 0, 0
exif:ImageLength: 3264
exif:ImageWidth: 4896
exif:ISOSpeedRatings: 400
exif:Make: Canon
exif:MaxApertureValue: 3/1
exif:MeteringMode: 3
exif:Model: Canon EOS-1D Mark IV
exif:Orientation: 1
exif:PhotometricInterpretation: 2
exif:ResolutionUnit: 2
exif:SamplesPerPixel: 3
exif:SceneCaptureType: 0
exif:ShutterSpeedValue: 614400/65536
exif:Software: Adobe Photoshop CS5.1 Macintosh
exif:SubSecTime: 69
exif:SubSecTimeDigitized: 69
exif:SubSecTimeOriginal: 69
exif:thumbnail:Compression: 6
exif:thumbnail:JPEGInterchangeFormat: 1166
exif:thumbnail:JPEGInterchangeFormatLength: 5182
exif:thumbnail:ResolutionUnit: 2
exif:thumbnail:XResolution: 72/1
exif:thumbnail:YResolution: 72/1
exif:UserComment: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
exif:WhiteBalance: 0
exif:XResolution: 3000000/10000
exif:YCbCrPositioning: 2
exif:YResolution: 3000000/10000
jpeg:colorspace: 4
jpeg:sampling-factor: 1x1,1x1,1x1,1x1
signature: 68f66921a9089f1cda15f6985b73e5f49c54ec0ad7b2356f3e75e380c0b0dbfe
Profiles:
Profile-8bim: 7412 bytes
Profile-exif: 6354 bytes
Profile-iptc: 84 bytes
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
unknown[2,0]:
Created Date[2,55]: 20130621
Created Time[2,60]: 120041+0000
Profile-xmp: 4063 bytes
Artifacts:
verbose: true
Tainted: False
Filesize: 20.1333MiB
Number pixels: 15.9805M
Pixels per second: 16.4748MB
User time: 0.960u
Elapsed time: 0:01.969
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-04-12 http://www.imagemagick.org
----------------------------------------------------------
Detail my result image:
======================
Image: dest.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 4896x3264+0+0
Resolution: 300x300
Print size: 16.32x10.88
Units: PixelsPerInch
Colorspace: sRGB
Type: TrueColor
Base type: Undefined
Endianess: Undefined
Depth: 8-bit
Channel depth:
Red: 8-bit
Green: 8-bit
Blue: 8-bit
Channel statistics:
Pixels: 15980544
Red:
min: 0 (0)
max: 255 (1)
mean: 108.275 (0.424607)
standard deviation: 79.9685 (0.313602)
kurtosis: -1.30956
skewness: 0.152824
entropy: 0.949478
Green:
min: 0 (0)
max: 255 (1)
mean: 129.899 (0.509407)
standard deviation: 72.909 (0.285917)
kurtosis: -1.26105
skewness: 0.0263701
entropy: 0.981494
Blue:
min: 0 (0)
max: 255 (1)
mean: 131.301 (0.514904)
standard deviation: 80.5578 (0.315913)
kurtosis: -1.39313
skewness: -0.0591129
entropy: 0.969149
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 123.158 (0.482973)
standard deviation: 77.8117 (0.305144)
kurtosis: -1.31312
skewness: 0.0243738
entropy: 0.966707
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)
Matte color: grey74
Background color: white
Border color: srgb(223,223,223)
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 4896x3264+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 99
Orientation: TopLeft
Properties:
date:create: 2018-04-16T12:43:10+08:00
date:modify: 2018-04-16T12:43:10+08:00
exif:ApertureValue: 483328/65536
exif:BitsPerSample: 8, 8, 8
exif:ColorSpace: 65535
exif:ComponentsConfiguration: 1, 2, 3, 0
exif:CustomRendered: 0
exif:DateTime: 2017:09:22 11:43:31
exif:DateTimeDigitized: 2013:06:21 12:00:41
exif:DateTimeOriginal: 2013:06:21 12:00:41
exif:ExifImageLength: 3264
exif:ExifImageWidth: 4896
exif:ExifOffset: 308
exif:ExifVersion: 48, 50, 50, 49
exif:ExposureBiasValue: 0/1
exif:ExposureMode: 0
exif:ExposureProgram: 2
exif:ExposureTime: 1/640
exif:Flash: 16
exif:FlashPixVersion: 48, 49, 48, 48
exif:FNumber: 13/1
exif:FocalLength: 32/1
exif:FocalPlaneResolutionUnit: 2
exif:FocalPlaneXResolution: 4896000/1290
exif:FocalPlaneYResolution: 3264000/836
exif:GPSInfo: 1052
exif:GPSVersionID: 2, 2, 0, 0
exif:ImageLength: 3264
exif:ImageWidth: 4896
exif:ISOSpeedRatings: 400
exif:Make: Canon
exif:MaxApertureValue: 3/1
exif:MeteringMode: 3
exif:Model: Canon EOS-1D Mark IV
exif:Orientation: 1
exif:PhotometricInterpretation: 2
exif:ResolutionUnit: 2
exif:SamplesPerPixel: 3
exif:SceneCaptureType: 0
exif:ShutterSpeedValue: 614400/65536
exif:Software: Adobe Photoshop CS5.1 Macintosh
exif:SubSecTime: 69
exif:SubSecTimeDigitized: 69
exif:SubSecTimeOriginal: 69
exif:thumbnail:Compression: 6
exif:thumbnail:JPEGInterchangeFormat: 1166
exif:thumbnail:JPEGInterchangeFormatLength: 5182
exif:thumbnail:ResolutionUnit: 2
exif:thumbnail:XResolution: 72/1
exif:thumbnail:YResolution: 72/1
exif:UserComment: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
exif:WhiteBalance: 0
exif:XResolution: 300/1
exif:YCbCrPositioning: 2
exif:YResolution: 300/1
icc Copyright International Color Consortium, 2015
icc:description: sRGB2014
icc:manufacturer: sRGB2014
icc:model: IEC 61966-2-1 Default RGB Colour Space - sRGB
jpeg:colorspace: 2
jpeg:sampling-factor: 1x1,1x1,1x1
signature: ce3c79e46b3011f19280013cf9f9737a225d073216ceb7fc24de6c3e52331780
Profiles:
Profile-8bim: 7412 bytes
Profile-exif: 6354 bytes
Profile-icc: 3024 bytes
Profile-iptc: 84 bytes
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
City[1,90]: 0x00000000: 254700 -%
unknown[2,0]:
Created Date[2,55]: 20130621
Created Time[2,60]: 120041+0000
Profile-xmp: 4063 bytes
Artifacts:
verbose: true
Tainted: False
Filesize: 13.808MiB
Number pixels: 15.9805M
Pixels per second: 24969600B
User time: 0.630u
Elapsed time: 0:01.640
Version: ImageMagick 7.0.7-28 Q16 x86_64 2018-04-12 http://www.imagemagick.org
==================================
"dest.jpg" looks obvious different with orginal. I don't know what's I missed...
Thanks for your help.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting anything to RGB correctly
You have converted to sRGB, not RGB.yfli wrote:... to RGB "colorspace".
Compared to what? Your source image has no profile, so no-one can know what the colours should be. Any software that displays the image will make some assumption about what the colours should be. The software may assume the file is encoded with a particular profile. You might experiment with different profiles. Perhaps also with different "-intent" settings.yfli wrote:The result image looks more brighter and contraster;
snibgo's IM pages: im.snibgo.com
Re: Converting anything to RGB correctly
Really thanks for your quick response very much.
Yes, I convert the image to "sRGB" instead of "RGB".
Please find the result below, that's what I always got with different [CMYK].icc (USWebCoatedSWOP.icc/Generic CMYK Profile.icc etc) profiles.
Also I tried with "-intent" settings, it's seems did not make difference....
I also tried the paire of CMYK and sRGB profiles, which works OK in Photoshop(do nothing but opening and save as...), but did not get same color image from source.
With lack of image tecnologies, I could not find more solutions to solve this problem efficiently .
So any "Best practice" is appreciated.
Thanks
Yes, I convert the image to "sRGB" instead of "RGB".
Please find the result below, that's what I always got with different [CMYK].icc (USWebCoatedSWOP.icc/Generic CMYK Profile.icc etc) profiles.
Also I tried with "-intent" settings, it's seems did not make difference....
I also tried the paire of CMYK and sRGB profiles, which works OK in Photoshop(do nothing but opening and save as...), but did not get same color image from source.
With lack of image tecnologies, I could not find more solutions to solve this problem efficiently .
So any "Best practice" is appreciated.
Thanks