changeset 12210:cd6f7f4f53a3

Deprecate saveimage.m.
author Rik <octave@nomad.inbox5.com>
date Sat, 29 Jan 2011 19:08:45 -0800
parents 61a4171c057f
children 11faa69c4eaa
files ChangeLog NEWS scripts/ChangeLog scripts/deprecated/module.mk scripts/deprecated/saveimage.m scripts/image/module.mk scripts/image/saveimage.m
diffstat 6 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-29  Rik  <octave@nomad.inbox5.com>
+
+	* NEWS: Deprecate saveimage function.
+
 2011-01-28  Ben Abbott  <bpabbott@mac.com>
 
 	* README.MacOS: Spelling corrections.
--- a/NEWS
+++ b/NEWS
@@ -410,8 +410,8 @@
     release after 3.4):
 
       autocor  cellidx   gammai     replot
-      autocov  dispatch  is_global  values
-      betai    fstat     krylovb
+      autocov  dispatch  is_global  saveimage 
+      betai    fstat     krylovb    values
 
   * For compatibility with Matlab, mu2lin (x) is now equivalent to
     mu2lin (x, 0).
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-29  Rik  <octave@nomad.inbox5.com>
+
+	* deprecated/module.mk, image/module.mk: Deprecate saveimage.m.
+
 2011-01-29  Rik  <octave@nomad.inbox5.com>
 
 	* optimization/glpkmex.m: Add seealso reference to glpk.
--- a/scripts/deprecated/module.mk
+++ b/scripts/deprecated/module.mk
@@ -23,6 +23,7 @@
   deprecated/mark_as_command.m \
   deprecated/mark_as_rawcommand.m \
   deprecated/replot.m \
+  deprecated/saveimage.m \
   deprecated/setstr.m \
   deprecated/spatan2.m \
   deprecated/spchol2inv.m \
rename from scripts/image/saveimage.m
rename to scripts/deprecated/saveimage.m
--- a/scripts/image/saveimage.m
+++ b/scripts/deprecated/saveimage.m
@@ -76,6 +76,13 @@
 
 function saveimage (fname, img, fmt, map)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "saveimage is obsolete and will be removed from a future version of Octave; please use imwrite instead");
+  endif
+
   if (nargin < 2 || nargin > 4)
     print_usage ();
   endif
--- a/scripts/image/module.mk
+++ b/scripts/image/module.mk
@@ -32,7 +32,6 @@
   image/rgb2hsv.m \
   image/rgb2ind.m \
   image/rgb2ntsc.m \
-  image/saveimage.m \
   image/spring.m \
   image/summer.m \
   image/white.m \