Mercurial > hg > octave-image
changeset 548:e9221c0aa50e
im2double: added tests
author | carandraug |
---|---|
date | Wed, 11 Apr 2012 16:45:41 +0000 |
parents | 49236210d491 |
children | 7dbbeef84707 |
files | inst/im2double.m |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/inst/im2double.m +++ b/inst/im2double.m @@ -67,3 +67,8 @@ error ("unsupported image class"); endswitch endfunction + +%!assert(im2double([1 2 3]), [1 2 3]); # double returns the same +%!assert(im2double(uint8([0 255])), [0 1]); # basic usage +%!assert(im2double(uint8([1 25]), "indexed"), [2 26]); # test indexed +%!assert(im2double(int16([-32768 32768])), [0 1]); # test signed integer