Mercurial > hg > octave-lyh
changeset 7933:54e414cc106b
style fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 16 Jul 2008 14:21:24 -0400 |
parents | d75586531aac |
children | 5a156ab94dd2 |
files | src/DLD-FUNCTIONS/__magick_read__.cc |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/__magick_read__.cc +++ b/src/DLD-FUNCTIONS/__magick_read__.cc @@ -72,9 +72,12 @@ for (int frame = 0; frame < nframes; frame++) { imvec[frameidx(frame)].getConstPixels (0, 0, columns, rows); + const Magick::IndexPacket *pix = imvec[frameidx(frame)].getConstIndexes (); + i = 0; + for (int y = 0; y < rows; y++) for (int x = 0; x < columns; x++) im(y,x,frame) = static_cast<octave_uint8> (pix[i++]); @@ -87,12 +90,16 @@ case 16: { uint16NDArray im = uint16NDArray (dim_vector(rows, columns, nframes)); + for (int frame = 0; frame < nframes; frame++) { imvec[frameidx(frame)].getConstPixels (0, 0, columns, rows); + const Magick::IndexPacket *pix = imvec[frameidx(frame)].getConstIndexes (); + i = 0; + for (int y = 0; y < rows; y++) for (int x = 0; x < columns; x++) im(y,x,frame) = static_cast<octave_uint16> (pix[i++]);