help-octave
[Top][All Lists]
Advanced

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

FW: What does imagesc.m need?


From: Joe Koski
Subject: FW: What does imagesc.m need?
Date: Tue, 02 Mar 2004 22:23:25 -0700
User-agent: Microsoft-Entourage/10.1.4.030702.0

on 2/28/04 1:53 PM, Paul Kienzle at address@hidden wrote:

> 
> On Feb 28, 2004, at 11:55 AM, Joe Koski wrote:
> 
>> I had just installed ImageMagick, but tested it within the same
>> terminal
>> window as the installation. When I tried again later, with a new
>> terminal
>> window, everything worked. Maybe the .cshrc had to be rerun before
>> convert
>> was recognized? In the mean time, I had also installed xv, which
>> confused
>> the issue. The question remains: is there another dependency needed to
>> do a
>> fresh install of octave-2.1.50 from Fink, i. e., ImageMagick or
>> convert?
> 
> You can do it without 'convert' by directly writing a BMP file
> using bmpwrite.m from octave-forge.
> 
> Here's an example using peaks.m from octave-forge:
> 
> colormap(hot);
> M=imagesc(peaks(40));
> bmpwrite(M,hot,'/tmp/junk.bmp');
> system('open /tmp/junk.bmp; sleep 1; rm -f /tmp/junk.bmp');
> 
> The user can control zoom with apple-plus and apple-minus, but
> it would be nice to start with zoom to fit.  I can't find any docs for
> applescript commands accepted by Preview.
> 
> Note the 'sleep 1; rm -f /tmp/junk.bmp' which waits a bit so that
> the file has a chance to load, then removes it.
> 
Thanks, Paul. I tried this with my routines, and, indeed, it does work. The
resulting .bmp image was of the same quality in Preview as the 'convert'
.tiff image. If I had not already downloaded ImageMagick, this approach
would have solved my problem without the necessity of the download. I did
have to increase the 'sleep 1' to 'sleep 10' to get it to work. Apparently,
I have a bigger than average plot.

Joe Koski
 
Further update:

After the above worked on a simpler plot, I ran a larger plot. Result: The
ImageMagick convert routine ran out of (my limited 288 MB) memory, and went
into spasms trying to use virtual memory. After a half an hour of page-ins
and -outs, I killed everything and started over with the bmpwrite approach.
The bmpwrite routine had the plot ready in less than a minute because it
didn't run out of memory.

Maybe I should vote for the bmpwrite approach with imagesc on the Mac until
I get more memory with my new computer.

Joe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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