Mercurial > hg > octave-nkf
comparison scripts/image/imread.m @ 9456:8a082b66c1e0
imread.m: fix test
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 23 Jul 2009 16:19:20 -0400 |
parents | 3ca88e72f0e8 |
children | f0f19b51b5d0 |
comparison
equal
deleted
inserted
replaced
9455:ee8a035f3997 | 9456:8a082b66c1e0 |
---|---|
110 %! fid = fopen('test.png', 'wb'); | 110 %! fid = fopen('test.png', 'wb'); |
111 %! fwrite(fid, vpng); | 111 %! fwrite(fid, vpng); |
112 %! fclose(fid); | 112 %! fclose(fid); |
113 %! A = imread('test.png'); | 113 %! A = imread('test.png'); |
114 %! delete('test.png'); | 114 %! delete('test.png'); |
115 %! assert(A(:,:,1), [0, 255, 0; 255, 237, 255; 0, 255, 0]); | 115 %! assert(A(:,:,1), uint8 ([0, 255, 0; 255, 237, 255; 0, 255, 0])); |
116 %! assert(A(:,:,2), [0, 255, 0; 255, 28, 255; 0, 255, 0]); | 116 %! assert(A(:,:,2), uint8 ([0, 255, 0; 255, 28, 255; 0, 255, 0])); |
117 %! assert(A(:,:,3), [0, 255, 0; 255, 36, 255; 0, 255, 0]); | 117 %! assert(A(:,:,3), uint8 ([0, 255, 0; 255, 36, 255; 0, 255, 0])); |