mackermedia wrote:Those colors of in my verbose listings, I believe, are the RGB colors. If you want the same colors as input, then you must use sRGB for your output color space.
I'm struggling with how to reframe my question more clearly...
My question put as simply as possible is this:
I want to input values as RGB (NOT sRGB). I then want the values output to be RGB (NOT sRGB). Is this possible?
Possibly, you need to use profiles to convert from sRGB to RGB and to input values in linear RGB colors, you would have to use
icc-color(rgb, r, g, b) where r,g,b range from 0 to 1 (divide R,G,B in range 0 to 255 by 255 to get values for r,g,b in range 0 to 1 and keep the fractions.) see
http://www.imagemagick.org/script/color.php
But the image will still be labeled colorspace sRGB, however, the profiles will do the proper thing.
239/255=0.937254901960784
152/255=0.596078431372549
59/255=0.231372549019608
convert -size 100x100 xc:"icc-color(rgb,0.937,0.596,0.231)" -profile /Users/fred/images/Profiles/sRGB.icc -profile /Users/fred/images/Profiles/GenericRGBProfile.icc -depth 8 test2.tif
identify test2.tif
Code: Select all
Image: test2.tif
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 100x100+0+0
Units: PixelsPerInch
Type: Palette
Base type: TrueColor
Endianess: LSB
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Red:
min: 233 (0.913725)
max: 233 (0.913725)
mean: 233 (0.913725)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Green:
min: 134 (0.52549)
max: 134 (0.52549)
mean: 134 (0.52549)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Blue:
min: 46 (0.180392)
max: 46 (0.180392)
mean: 46 (0.180392)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Image statistics:
Overall:
min: 46 (0.180392)
max: 233 (0.913725)
mean: 137.667 (0.539869)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Colors: 1
Histogram:
10000: (233,134, 46) #E9862E srgb(233,134,46)
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: white
Border color: srgb(223,223,223)
Matte color: grey74
Transparent color: black
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 100x100+0+0
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Properties:
date:create: 2014-02-04T15:53:39-08:00
date:modify: 2014-02-04T15:53:39-08:00
icc:copyright: Copyright 2007 Apple Inc., all rights reserved.
icc:description: Generic RGB Profile
icc:manufacturer: Generic RGB Profile
icc:model: Generic RGB Profile
signature: eae035403546fb560619e5a865731ff9110a3e6c9749c3a074a126029bb38f87
tiff:document: test2.tif
tiff:endian: lsb
tiff:photometric: RGB
tiff:rows-per-strip: 27
Profiles:
Profile-icc: 1328 bytes
Artifacts:
filename: test2.tif
verbose: true
Tainted: False
Filesize: 31.7KB
Number pixels: 10K
Pixels per second: 1MB
User time: 0.000u
Elapsed time: 0:01.009
Version: ImageMagick 6.8.8-4 Q16 x86_64 2014-01-29 http://www.imagemagick.org
That is the best I can suggest.
My guess is that IM is showing the sRGB color values equivalent to the linear RGB values specified. So I am not sure if this answers your question or not. The issue is that the profiles are needed to do the proper conversion and you need some tool that interprets linear color values and not sRGB values.
If that does not answer your question, then one of the IM developer or someone who understand color management better than me needs to explain.
PS if you create these three images and display them, you will see the colors are different for the first vs the second and that the second and third are the same. IM converts the icc_colors from linear to sRGB before applying, then the profiles convert to RGB
convert -size 100x100 xc:"rgb(239,152,59)" -depth 8 orange_srgb.tif
convert -size 100x100 xc:"icc-color(rgb,0.937,0.596,0.231)" -profile /Users/fred/images/Profiles/sRGB.icc -profile /Users/fred/images/Profiles/GenericRGBProfile.icc -depth 8 orange_rgb.tif
convert -size 100x100 xc:"rgb(239,152,59)" -profile /Users/fred/images/Profiles/sRGB.icc -profile /Users/fred/images/Profiles/GenericRGBProfile.icc -depth 8 orange_rgb2.tif
convert orange_srgb.tif show:
convert orange_rgb.tif show:
convert orange_rgb2.tif show: