octave-patch-tracker
[Top][All Lists]
Advanced

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

[Octave-patch-tracker] [patch #8709] fixes to color conversion functions


From: Carnë Draug
Subject: [Octave-patch-tracker] [patch #8709] fixes to color conversion functions (mainly rgb2ntsc and ntsc2rgb)
Date: Sun, 25 Oct 2015 17:03:33 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0

Follow-up Comment #3, patch #8709 (project octave):

What is the purpose of:


diff -r 4bde15a9c8bb -r 6b9ab8ff18fd
scripts/image/private/colorspace_conversion_input_check.m
--- a/scripts/image/private/colorspace_conversion_input_check.m Di Jul 28
13:24:49 2015 -0400
+++ b/scripts/image/private/colorspace_conversion_input_check.m Mi Jul 29
21:47:19 2015 +0200
@@ -31,7 +31,7 @@
   if (! iscolormap (in_arg))
     if (! any (strcmp (cls, {"uint8", "uint16", "single", "double"})))
       error ("%s: %s of invalid data type '%s'", func, arg_name, cls);
-    elseif (size (in_arg, 3) != 3)
+    elseif (size (in_arg, 3) != 3 && !(size (in_arg) == [1, 3] || size
(in_arg) == [3, 1]))
       error ("%s: %s must be a colormap or %s image", func, arg_name,
arg_name);
     elseif (! isreal (in_arg) || ! isnumeric (in_arg))
       error ("%s: %s must be numeric and real", func, arg_name);
@@ -46,7 +46,7 @@
 
     ## Allow for ND images, i.e., multiple images on the 4th dimension.
     nd = ndims (in_arg);
-    if (nd == 3)
+    if (nd == 2 || nd == 3)
       is_nd = false;
     elseif (nd == 4)
       is_nd = true;


I have pushed http://hg.savannah.gnu.org/hgweb/octave/rev/b4ceb06009e0 as a
single commit while I review the rest.  

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8709>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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