help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grayscale images [bmp] are always saved as RGB with imwrite


From: Christian König
Subject: grayscale images [bmp] are always saved as RGB with imwrite
Date: Wed, 19 May 2010 21:07:44 +0200

Hey.

If I try to save a m x n unit8 matrix with imwrite as bmp I'm supposed
to get an grayscale image. But the saved image has always 3 separate
channels (I have checked it with gimp). imfinfo gives me a 'grayscale'
as ColorType, and

img=imread('File');
isgrey(img)
ans=0

ndims(img)
ans=2

My problem is, that for large m an n these files going to be really
big and have three-fold size than 'real grayscale' images.

minimal example:

img=eye(100,100);
img=uint8(a*255);
imwrite(img,'test.bmp');

I think this is maybe an error in imwrite?
I'm using octave 3.2.3. an image-1.0.12 from the octave forge.

Thanks,
Christian


reply via email to

[Prev in Thread] Current Thread [Next in Thread]