Mercurial > hg > octave-nkf
changeset 17372:63b53ea33a8b
imread: fix returning multiple variables.
* imread.m: fix mistake when filling varargout from cset. Do not miss
the first cell.
* __magick_read__.cc (read_maps): change class of alpha map which is
only a column vector, not a Nx3 Matrix.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Wed, 04 Sep 2013 21:22:43 +0100 |
parents | f9e8544ce66d |
children | 8508b8ae46a8 |
files | libinterp/dldfcn/__magick_read__.cc scripts/image/imread.m |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/__magick_read__.cc +++ b/libinterp/dldfcn/__magick_read__.cc @@ -169,14 +169,14 @@ // can't call colorMapSize on const Magick::Image const octave_idx_type mapsize = img.colorMapSize (); Matrix cmap = Matrix (mapsize, 3); // colormap - Matrix amap = Matrix (mapsize, 3); // alpha map + ColumnVector amap = ColumnVector (mapsize); // alpha map for (octave_idx_type i = 0; i < mapsize; i++) { const Magick::ColorRGB c = img.colorMap (i); cmap(i,0) = c.red (); cmap(i,1) = c.green (); cmap(i,2) = c.blue (); - amap(i,0) = c.alpha (); + amap(i) = c.alpha (); } octave_value_list maps; maps(0) = cmap;