change a black image from gray colorspace to rgb colorspace?
Posted: 2008-09-02T07:58:42-07:00
A question from an RMagick user.
I have an entirely black opaque PNG image. I'd like to make a copy in JPEG format and change the colorspace to RGB. I've tried this simple command but the colorspace remains Gray according to identify.
If it helps, here's what identify says about the input image:
I have an entirely black opaque PNG image. I'd like to make a copy in JPEG format and change the colorspace to RGB. I've tried this simple command but the colorspace remains Gray according to identify.
Code: Select all
convert input.png -colorspace RGB output.jpg
Code: Select all
Image: input.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 128x128+0+0
Resolution: 28.35x28.35
Print size: 4.51499x4.51499
Units: PixelsPerCentimeter
Type: Bilevel
Endianess: Undefined
Colorspace: Gray
Depth: 8/1-bit
Channel depth:
gray: 1-bit
alpha: 1-bit
Channel statistics:
gray:
min: 0 (0)
max: 0 (0)
mean: 0 (0)
standard deviation: -0 (-0)
opacity:
min: 0 (0)
max: 0 (0)
mean: 0 (0)
standard deviation: -0 (-0)
Histogram:
16384: ( 0, 0, 0, 0) #000000 black
Rendering intent: Undefined
Chromaticity:
red primary: (0.63999,0.33001)
green primary: (0.3,0.6)
blue primary: (0.15,0.05999)
white point: (0.31269,0.32899)
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: none
Page geometry: 128x128+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
create-date: 2008-09-01T16:20:08-04:00
modify-date: 2008-09-01T16:20:07-04:00
signature: 49f6ff9b24c008dc281f9b5e78644c12d9398ed5af3a3160620a88edbb117b00
Profiles:
Profile-icc: 3144 bytes
Artifacts:
verbose: true
Tainted: False
Filesize: 2.94531kb
Number pixels: 16kb
Version: ImageMagick 6.4.1 05/12/08 Q8 http://www.imagemagick.org