diff libinterp/corefcn/graphics.cc @ 18746:d57a83f2d73e

Preserve image class in cdata (bug #41240). * graphics.cc (convert_cdata): Add support for bool matrix input. * imshow.m: Remove hack converting single, integer, bool formats to double.
author Rik <rik@octave.org>
date Thu, 01 May 2014 11:16:03 -0700
parents ec55f6870efb
children 868dcab453bd
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Sun Mar 16 13:19:25 2014 +0100
+++ b/libinterp/corefcn/graphics.cc	Thu May 01 11:16:03 2014 -0700
@@ -866,6 +866,8 @@
     CONVERT_CDATA_1 (NDArray, , true);
   else if (cdata.is_single_type ())
     CONVERT_CDATA_1 (FloatNDArray, float_, true);
+  else if (cdata.is_bool_type ())
+    CONVERT_CDATA_1 (boolNDArray, bool_, false);
   else
     error ("unsupported type for cdata (= %s)", cdata.type_name ().c_str ());