[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Anybody have a prgram to write a .bmp file?
From: |
Robert A. Macy |
Subject: |
Anybody have a prgram to write a .bmp file? |
Date: |
Mon, 29 Jan 2007 10:19:45 -0800 |
I need a program that writes an r, g, b set of matrices to
create a .bmp file
Anybody got one?
for example: here are the simple matrices:
>> r=ones(256,1)*(0:255)/255;
>> g=.5*ones(256,256);
>> b=.5*ones(256,256);
I tried to do
>> imshow(r,g,b);
but I only get a solid colored image with no shading
variations. the colors only come up based upon the first
few pixels
I tried to do
>> [X,map]=rgb2ind(r,g,b);
>> saveimage("Xtest.ppm",X,"ppm",map);
but that produced an incorrect .ppm file that irfanview
turned into a series of striped lines.
Anybody got a function that writes 24 bit color .bmp files?
Help!
- Robert -