Mercurial > hg > octave-nkf
changeset 11034:6589aaf769f6
Correctly handle logical and integer bit depths
author | John Swensen <jpswensen@gmail.com> |
---|---|
date | Tue, 28 Sep 2010 17:23:52 -0400 |
parents | d9c8916bb9dd |
children | 8a6b7947f618 |
files | src/ChangeLog src/DLD-FUNCTIONS/__magick_read__.cc |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-09-28 John P. Swensen <jpswensen@gmail.com> + + * DLD-FUNCTIONS/__magick_read__.cc (encode_uint_image) + (encode_bool_image): Ensure bit depth encoding is correct for + logical, uint8, and uint16 images. + 2010-09-28 Jaroslav Hajek <highegg@gmail.com> * xpow.cc (xpow (double, const Matrix&)): Ensure real result for
--- a/src/DLD-FUNCTIONS/__magick_read__.cc +++ b/src/DLD-FUNCTIONS/__magick_read__.cc @@ -617,6 +617,10 @@ } } + im.quantizeColorSpace (Magick::GRAYColorspace); + im.quantizeColors (2); + im.quantize (); + imvec.push_back (im); } } @@ -743,6 +747,10 @@ im.pixelColor (y, x, c); } } + + im.quantizeColorSpace (Magick::GRAYColorspace); + im.quantizeColors (pow (2, bitdepth)); + im.quantize (); } imvec.push_back (im);