composite changes image from RGB to Greyscale
Posted: 2010-08-20T08:57:28-07:00
Hi,
I'm using composite to overlay a watermark on some images. It's a bunch of images that are later to be reassembled to a video. Anyway, here's what happens:
$ identify output-1.tga
output-1.tga TGA 1024x576 1024x576+0+0 8-bit DirectClass 20.3KiB 0.000u 0:00.010
$ identify scaled-watermark.tga
scaled-watermark.tga TGA 1024x576 1024x576+0+0 8-bit DirectClass 2.25MiB 0.210u 0:00.210
$ composite -dissolve 60 scaled-watermark.tga output-1.tga wmark-output-1.tga
$ identify wmark-output-1.tga
wmark-output-1.tga TGA 1024x576 1024x576+0+0 8-bit PseudoClass 256c 576KiB 0.060u 0:00.070
$ composite -colorspace RGB -dissolve 60 scaled-watermark.tga output-1.tga wmark-output-1.tga
$ identify wmark-output-1.tga
wmark-output-1.tga TGA 1024x576 1024x576+0+0 8-bit PseudoClass 256c 576KiB 0.060u 0:00.060
The GIMP identifies both my source files (output-1.tga and scaled-watermark.tga) as RGB color, and both versions of wmark-output-1.tga as Greyscale. Both input files are probably made up of only grey colors in some cases, but that doesn't mean I want to change the colorspace. And -colorspace RGB (or sRGB) didn't seem to do any good to make it stop.
How can I get composite to stop changing the color space? This is breaking my further use of the images, and it's a pain to have to process each image again if that's my option...
My version of ImageMagick, running on Ubuntu 10.04:
$ composite --version
Version: ImageMagick 6.5.7-8 2009-11-26 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP
Thanks for any help.
Ketil
I'm using composite to overlay a watermark on some images. It's a bunch of images that are later to be reassembled to a video. Anyway, here's what happens:
$ identify output-1.tga
output-1.tga TGA 1024x576 1024x576+0+0 8-bit DirectClass 20.3KiB 0.000u 0:00.010
$ identify scaled-watermark.tga
scaled-watermark.tga TGA 1024x576 1024x576+0+0 8-bit DirectClass 2.25MiB 0.210u 0:00.210
$ composite -dissolve 60 scaled-watermark.tga output-1.tga wmark-output-1.tga
$ identify wmark-output-1.tga
wmark-output-1.tga TGA 1024x576 1024x576+0+0 8-bit PseudoClass 256c 576KiB 0.060u 0:00.070
$ composite -colorspace RGB -dissolve 60 scaled-watermark.tga output-1.tga wmark-output-1.tga
$ identify wmark-output-1.tga
wmark-output-1.tga TGA 1024x576 1024x576+0+0 8-bit PseudoClass 256c 576KiB 0.060u 0:00.060
The GIMP identifies both my source files (output-1.tga and scaled-watermark.tga) as RGB color, and both versions of wmark-output-1.tga as Greyscale. Both input files are probably made up of only grey colors in some cases, but that doesn't mean I want to change the colorspace. And -colorspace RGB (or sRGB) didn't seem to do any good to make it stop.
How can I get composite to stop changing the color space? This is breaking my further use of the images, and it's a pain to have to process each image again if that's my option...
My version of ImageMagick, running on Ubuntu 10.04:
$ composite --version
Version: ImageMagick 6.5.7-8 2009-11-26 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP
Thanks for any help.
Ketil