diff scripts/image/imread.m @ 16996:a1d091243d11

Read alpha values from indexed images. Always read indexes from indexed images. * __magick_read__.cc (read_indexed_images): turn function into template to remove duplicated loop. Create alpha channel from alpha values colormap. Skip reading of colormap unless requested. Use fortran_vec to fill the image instead of indexing the Array<T> with a dim_vector which requires multiple calls to dim_vector::operator() per iteration. (__magick_read__): Always read the indexes of an indexed image and not the RGB or grayscale values when no colormap is requested for output (Matlab compatibility). * imread.m: document that an indexed image is always read as such, independently of the colormap having been requested or not. * NEWS: add note on the change for reading indexed images.
author Carnë Draug <carandraug@octave.org>
date Thu, 18 Jul 2013 01:52:09 +0100
parents 997efb8d0b19
children 3db796f89695
line wrap: on
line diff
--- a/scripts/image/imread.m	Wed Jul 17 14:47:46 2013 -0700
+++ b/scripts/image/imread.m	Thu Jul 18 01:52:09 2013 +0100
@@ -42,6 +42,9 @@
 ## The bit depth of the image determines the
 ## class of the output: "uint8" or "uint16" for gray
 ## and color, and "logical" for black and white.
+## Note that indexed images always return the indexes for a colormap,
+## independent if @var{map} is a requested output.  To obtain the actual
+## RGB image, use @code{ind2rgb}.
 ## See the Octave manual for more information in representing images.
 ##
 ## Some file formats, such as TIFF and GIF, are able to store multiple
@@ -53,12 +56,12 @@
 ## of images with @var{param}, @var{val} pairs.  The following options
 ## are supported:
 ##
-## @table @asis
-## @item Frames or Index
+## @table @samp
+## @item "Frames" or "Index"
 ## This is an alternative method to specify @var{idx}.  When specifying it
 ## in this way, its value can also be the string "all".
 ##
-## @item Info
+## @item "Info"
 ## This option exists for @sc{Matlab} compatibility and has no effect.  For
 ## maximum performance while reading multiple images from a single file,
 ## use the Index option.