Mercurial > hg > octave-nkf
changeset 9265:7f3a1a90f4f4
imread: scale values from old Octave image format
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 May 2009 14:57:46 -0400 |
parents | be7d8132c139 |
children | 1d3b91166b9c |
files | scripts/ChangeLog scripts/deprecated/loadimage.m scripts/image/imread.m |
diffstat | 3 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2009-05-26 John W. Eaton <jwe@octave.org> + + * image/imread.m: Scale image data from old Octave image format so + that it will work with imshow. + * deprecated/loadimage.m: Undo scaling here for compatibility. + 2009-05-26 Søren Hauberg <hauberg@gmail.com> * help/__makeinfo__.m: Support several @seealso's in one text.
--- a/scripts/deprecated/loadimage.m +++ b/scripts/deprecated/loadimage.m @@ -41,4 +41,6 @@ [img_retval, map_retval] = imread (varargin{:}); + img_retval *= 64; + endfunction
--- a/scripts/image/imread.m +++ b/scripts/image/imread.m @@ -77,9 +77,9 @@ if (map_field && (img_field || x_field)) varargout{2} = vars.map; if (img_field) - varargout{1} = vars.img; + varargout{1} = vars.img / 64; else - varargout{1} = vars.X; + varargout{1} = vars.X / 64; endif else error ("imread: invalid Octave image file format");