help-octave
[Top][All Lists]
Advanced

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

Re: Anybody have a prgram to write a .bmp file?


From: Robert A. Macy
Subject: Re: Anybody have a prgram to write a .bmp file?
Date: Sun, 04 Feb 2007 05:44:33 -0800

color doesn't seem to work almost at all

if I do
>> [X,map]=rgb2ind(r,g,b);
>> saveimage("Xtest.ppm",X,"ppm",map);
I almost get something of interest

if I do 
>> [X,map]=gray2ind(r,256);
>> bmpwrite(X,map,"Xtest.bmp");
I get a proper gray scaled image EXCEPT...
r cannot be in this range 0 <= r <= 1 
it must be in this range 0 <= r <= 255/256
or else wherever the image is near 1 becomes black as if 0

Using Paint:
just a note, the Xtest.bmp in gray scale is stored as 256
color at a size of 113K. If I save the image as 24 bit
color, the stored file enlarges to 334K.  

octave:
Converting the r,g,b to indexed image and then bmpwrite
that image is also stored also as 256 color, not 24 bit
color?!  and the size is too large at 556K?! Not the proper
24 bit color size of 334K.  Note .ppm was 334K.

        - Robrt-

interestingly, the command
>> saveimage("Xtest.ppm",X,"ppm",map);
produces a 334K size file.  



On Thu, 1 Feb 2007 06:39:04 -0500
 Paul Kienzle <address@hidden> wrote:
> I don't remember if 2.1.50 supports true color bmp,
> and if it does, how it stores the info.  You will have
> to look into the code using, e.g., "type bmpwrite".
> 


reply via email to

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