octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

imread test failure


From: Ben Abbott
Subject: imread test failure
Date: Fri, 26 Jun 2009 20:04:13 -0400

Does anyone else see this?

If not, might this be the result of a faulty graphicsmagick installation?

Ben


octave:5> test imread
  ***** test
 vpng = [ ...
  137,  80,  78,  71,  13,  10,  26,  10,   0,   0, ...
    0,  13,  73,  72,  68,  82,   0,   0,   0,   3, ...
    0,   0,   0,   3,   8,   2,   0,   0,   0, 217, ...
   74,  34, 232,   0,   0,   0,   1, 115,  82,  71, ...
   66,   0, 174, 206,  28, 233,   0,   0,   0,   4, ...
  103,  65,  77,  65,   0,   0, 177, 143,  11, 252, ...
   97,   5,   0,   0,   0,  32,  99,  72,  82,  77, ...
    0,   0, 122,  38,   0,   0, 128, 132,   0,   0, ...
  250,   0,   0,   0, 128, 232,   0,   0, 117,  48, ...
    0,   0, 234,  96,   0,   0,  58, 152,   0,   0, ...
   23, 112, 156, 186,  81,  60,   0,   0,   0,  25, ...
   73,  68,  65,  84,  24,  87,  99,  96,  96,  96, ...
  248, 255, 255,  63, 144,   4,  81, 111, 101,  84, ...
   16,  28, 160,  16,   0, 197, 214,  13,  34,  74, ...
  117, 213,  17,   0,   0,   0,   0,  73,  69,  78, ...
   68, 174,  66,  96, 130];
 fid = fopen('test.png', 'wb');
 fwrite(fid, vpng);
 fclose(fid);
 A = imread('test.png');
 delete('test.png');
 assert(A(:,:,1), [0, 255, 0; 255, 237, 255; 0, 255, 0]);
 assert(A(:,:,2), [0, 255, 0; 255,  28, 255; 0, 255, 0]);
 assert(A(:,:,3), [0, 255, 0; 255,  36, 255; 0, 255, 0]);
!!!!! test failed
assert (A (:, :, 1),[0, 255, 0; 255, 237, 255; 0, 255, 0]) expected
     0   255     0
   255   237   255
     0   255     0
but got
    0  255    0
  255  237  255
    0  255    0
Type uint8 matrix != matrix


reply via email to

[Prev in Thread] Current Thread [Next in Thread]