Why does convert change my RGB value?
Posted: 2012-08-29T13:40:15-07:00
I am trying to generate a simple blank canvas from an RGB value and save it as a JPEG.
The command I am using is quite simple:
Unfortunately, all of the pixels in the resulting image are slightly off: #F5F2EB
Here is the output of identify -verbose on the resulting image:
Can anyone explain why the colour value is being changed? I've been scratching my head with this for days. Only certain colours seem to cause this. I've tried experimenting with colorspaces as well, to no avail.
Thanks,
Andrew
The command I am using is quite simple:
Code: Select all
convert -size 460x460 xc:#F4F2EA -quality 100 image.jpg
Here is the output of identify -verbose on the resulting image:
Code: Select all
Image: ligIM.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 460x460+0+0
Units: Undefined
Type: Palette
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Red:
min: 245 (0.960784)
max: 245 (0.960784)
mean: 245 (0.960784)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Green:
min: 242 (0.94902)
max: 242 (0.94902)
mean: 242 (0.94902)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Blue:
min: 235 (0.921569)
max: 235 (0.921569)
mean: 235 (0.921569)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Image statistics:
Overall:
min: 235 (0.921569)
max: 245 (0.960784)
mean: 240.667 (0.943791)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Colors: 1
Histogram:
211600: (245,242,235) #F5F2EB srgb(245,242,235)
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)
Interlace: None
Background color: white
Border color: srgb(223,223,223)
Matte color: grey74
Transparent color: black
Compose: Over
Page geometry: 460x460+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG
Quality: 100
Orientation: Undefined
Properties:
date:create: 2012-08-29T16:35:58-04:00
date:modify: 2012-08-29T16:35:58-04:00
jpeg:colorspace: 2
jpeg:sampling-factor: 1x1,1x1,1x1
signature: 8a0a2f88ce4527538ae2ff9195c5d3aaf0769fc7ac2eb17fc84b18875fa39043
Artifacts:
filename: ligIM.jpg
verbose: true
Tainted: False
Filesize: 2.81KB
Number pixels: 212K
Pixels per second: 21.16MB
User time: 0.010u
Elapsed time: 0:01.009
Version: ImageMagick 6.7.9-0 2012-08-29 Q16 http://www.imagemagick.org
Thanks,
Andrew