[vox-tech] Fwd: Re: Forcing a greyscape JPEG into RGB colorspace?

Bill Kendrick nbs at sonic.net
Mon Jun 14 16:34:30 PDT 2010


On Mon, Jun 14, 2010 at 04:27:04PM -0700, Bill Kendrick wrote:
<snip> 
> What are you using to determine the type of image? From what I have been
> reading, imagemagick tells you about the contents of the image, not the
> actual format it is saved in.
> 
> $ convert grey.jpg -type TrueColor converted.jpg
> 
> $ identify -verbose converted.jpg |grep Type:
>   Type: Grayscale

I have no idea what the 3rd party uses, but we get reports back.
I forget (since it's been about 2 months) exactly what I was doing
to try and determine whether the resulting JPEG was 'right'.


> $ djpeg -v -outfile /dev/null grey.jpg 2>&1 |grep components
> Start Of Frame 0xc0: width=164, height=238, components=1
> Start Of Scan: 1 components
> 
> $ djpeg -v -outfile /dev/null converted.jpg 2>&1 |grep components
> Start Of Frame 0xc0: width=164, height=238, components=3
> Start Of Scan: 3 components
> 
> (This shows that there are 3 components and not 1 like the grey image.)

So the trick might be the "-type TrueColor" option...  I'll if that helps.
Thanks!

-bill!


More information about the vox-tech mailing list