comparison scripts/image/imread.m @ 12092:cca16271a517 release-3-2-x

imread.m: fix test
author John W. Eaton <jwe@octave.org>
date Mon, 14 Sep 2009 07:57:38 +0200
parents 6f1857d0f5c1
children
comparison
equal deleted inserted replaced
12091:6f1857d0f5c1 12092:cca16271a517
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]));