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: Henry F. Mollet
Subject: Re: Anybody have a prgram to write a .bmp file?
Date: Tue, 30 Jan 2007 19:06:47 -0800
User-agent: Microsoft-Entourage/11.1.0.040913

I get the same as what Robert A. Macy described.
[~] -bash-2.05b 501$ octave
GNU Octave, version 2.1.71 (powerpc-apple-darwin8.1.0).

octave:1> r=ones(256,1)*(0:255)/255;
octave:2> g=.5*ones(256,256);
octave:3> b=.5*ones(256,256);
octave:4> imshow(r,g,b);
octave:5> 
and using
G N U P L O T
version 4.0 patchlevel 0
Attached graph appears in Preview (version3.0.8 (409); copyright Apple) by
default or set up this way.
Henry


on 1/30/07 9:46 AM, Jordi Gutierrez Hermoso at address@hidden wrote:

> On 29/01/07, Robert A. Macy <address@hidden> wrote:
>> I need a program that writes an r, g, b set of matrices to
>> create a .bmp file
>> 
>> Anybody got one?
> 
> Sure. ImageMagick. I think I heard you say that you use a non-free
> operating system, and I'm not sure if those distributions of Octave
> include ImageMagick by default; you might have to get it on your own.
> 
> I'm also using the 'forge script imwrite to do the writing.
> 
>> 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
> 
> That's odd. I can't reproduce this behaviour on Debian with Octave
> 2.9.9. Octave is calling ImageMagick to do the rendering, though, and
> I think I read that you aren't using ImageMagick.
> 
> HTH,
> - Jordi G. H.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave

Attachment: imshow(r,g,b)_test.bmp
Description: Binary data


reply via email to

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