Mercurial > hg > octave-lyh
changeset 3714:38ff09748e26
[project @ 2000-08-25 06:10:30 by jwe]
author | jwe |
---|---|
date | Fri, 25 Aug 2000 06:10:30 +0000 |
parents | 0c7f2dda1d1a |
children | e5ff21d2bac6 |
files | scripts/ChangeLog scripts/image/image.m |
diffstat | 2 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2000-08-25 Thomas Walter <walter@pctc.chemie.uni-erlangen.de> + + * image/image.m: Try display (from ImageMagick) first. + 2000-08-01 Rolf Fabian <fabian@tu-cottbus.de> * plot/meshgrid.m: Use transpose to reorient vectors, not complex
--- a/scripts/image/image.m +++ b/scripts/image/image.m @@ -25,6 +25,9 @@ ## length of the colormap. If @var{zoom} is omitted, the image will be ## scaled to fit within 600x350 (to a max of 4). ## +## It first tries to use @code{display} from @code{ImageMagick} then +## @code{xv} and then @code{xloadimage}. +## ## The axis values corresponding to the matrix elements are specified in ## @var{x} and @var{y}. At present they are ignored. ## @end deftypefn @@ -38,7 +41,7 @@ if (nargin == 0) ## Load Bobbie Jo Richardson (Born 3/16/94) - x = loadimage ("default.img"); + A = loadimage ("default.img"); zoom = 2; elseif (nargin == 1) A = x; @@ -74,12 +77,15 @@ xloadimage = sprintf ("xloadimage -zoom %f %s", zoom*100, ppm_name); + ## ImageMagick: + im_display = sprintf ("display -geometry %f%% %s", zoom*100, ppm_name); + rm = sprintf ("rm -f %s", ppm_name); ## Need to let the shell clean up the tmp file because we are putting ## the viewer in the background. - system (sprintf ("( %s || %s && %s ) > /dev/null 2>&1 &", - xv, xloadimage, rm)); + system (sprintf ("( %s || %s || %s && %s ) > /dev/null 2>&1 &", + im_display, xv, xloadimage, rm)); endfunction