changeset 9273:61abb94f46f4

fix imshow demos
author John W. Eaton <jwe@octave.org>
date Wed, 27 May 2009 06:21:36 -0400
parents 3eda945bda43
children 6e519bd01615
files scripts/ChangeLog scripts/image/imshow.m
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-27  John W. Eaton  <jwe@octave.org>
+
+	* image/imshow.m: In demo, convert image to rgb before scaling
+	components.  Use imread instead of loadimage.
+
 2009-05-26  Ben Abbott <bpabbott@mac.com>
 
 	* plot/__go_draw_axes__.m: Fix rendering of overlaping images and
--- a/scripts/image/imshow.m
+++ b/scripts/image/imshow.m
@@ -186,12 +186,13 @@
 %!  colormap ("autumn");
 
 %!demo
-%!  [I, M] = loadimage ("default.img");
+%!  [I, M] = imread ("default.img");
 %!  imshow (I, M);
 
 %!demo
-%!  [I, M] = loadimage ("default.img");
-%!  imshow (cat(3, I, I*0.5, I*0.8));
+%!  [I, M] = imread ("default.img");
+%!  [R, G, B] = ind2rgb (I, M);
+%!  imshow (cat(3, R, G*0.5, B*0.8));
 
 %!demo
 %!  imshow (rand (100, 100));