Mercurial > hg > octave-shane
changeset 9274:6e519bd01615
Fix RGB color construction in __magick_read__.cc
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 27 May 2009 15:28:50 +0200 |
parents | 61abb94f46f4 |
children | 86f475d5e7d1 |
files | src/ChangeLog src/DLD-FUNCTIONS/__magick_read__.cc |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-05-27 Jaroslav Hajek <highegg@gmail.com> + + * DLD-FUNCTIONS/__magick_read__.cc (encode_map): Fix RGB color + construction. + 2009-05-26 John W. Eaton <jwe@octave.org> * load-path.h, load-path.cc (load_path::files, load_path::do_files):
--- a/src/DLD-FUNCTIONS/__magick_read__.cc +++ b/src/DLD-FUNCTIONS/__magick_read__.cc @@ -653,7 +653,6 @@ encode_map (std::vector<Magick::Image>& imvec, const NDArray& cmap) { unsigned int mapsize = cmap.dim1 (); - Magick::ColorRGB c; int nframes = static_cast<int>(imvec.size ()); for (int fnum = 0; fnum < nframes; fnum++) @@ -664,9 +663,7 @@ for (unsigned int ii = 0; ii < mapsize; ii++) { - c.red (cmap(ii,0)); - c.green (cmap(ii,1)); - c.blue (cmap(ii,2)); + Magick::ColorRGB c (cmap(ii,0), cmap(ii,1), cmap(ii,2)); // FIXME -- is this case needed? if (cmap.dim2 () == 4)