I just started using imagemagick.
With command-line "convert" utility, I am trying to append two images together and have the output file be in the same format as the input images.
My two input images are grayscale (8-bit) BMP images.
(They are 320x480 pixels each, so that's exactly the number of bytes that is contained in the data).
If I do
convert <first_image> <second_image> -color 256 <output_file>, I get an image that's somehow only 144KB (instead of the expected 302KB), while the image properties (in windows) state that it is a "32-bit" image.
If I use identify for my input images I get:
...1.bmp BMP 320x480 320x480+0+0 PseudoClass 256c 8-bit 151.053kb
I don't know what is "PseudoClass", but how do I get my output image to be that type as well?
Thanks,
a1
keep 8-bit depth grayscale colorspace for output BMP
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: keep 8-bit depth grayscale colorspace for output BMP
try
convert <first_image> <second_image> -colorspace Gray <output_file>
convert <first_image> <second_image> -colorspace Gray <output_file>
Re: keep 8-bit depth grayscale colorspace for output BMP
I have tried it. -colorspace Gray option doesn't seem to change anything for me. The output bmp is 24bit.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: keep 8-bit depth grayscale colorspace for output BMP
Do each image separately,
convert image1 -colorspace Gray outimage1
confert image2 -colorspace Gray outimage2
convert image1 -colorspace Gray outimage1
confert image2 -colorspace Gray outimage2
Re: keep 8-bit depth grayscale colorspace for output BMP
Converting like you said, creates output images that are smaller in byte size (i.e. from 152KB down to 89KB).
What amazes me, however, is that the quality of the image doesn't degrade.
As I said, my images are 320x480 (=153600bytes), with 8bits of resolution for each pixel. Now, somehow it is almost 1/2 that size, and yet the image quality is still, seemingly at 8 bits. What is going on?
What amazes me, however, is that the quality of the image doesn't degrade.
As I said, my images are 320x480 (=153600bytes), with 8bits of resolution for each pixel. Now, somehow it is almost 1/2 that size, and yet the image quality is still, seemingly at 8 bits. What is going on?
Re: keep 8-bit depth grayscale colorspace for output BMP
Does anyone know (re: question in my reply above)?