diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-07 13:45:17 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-07 13:46:04 -0400 |
commit | ffcd82f3b5f1fb197550b005b11cae1651a8fe34 (patch) | |
tree | d13089d8bb0e6b434e7de35d6564d9d1efb72ad5 /t/P3.t | |
parent | 34123b9d0460b50118a76290aafa0fc31eb365b1 (diff) | |
download | image-pnm-ffcd82f3b5f1fb197550b005b11cae1651a8fe34.tar.gz image-pnm-ffcd82f3b5f1fb197550b005b11cae1651a8fe34.zip |
fix mixed up width and height
Diffstat (limited to 't/P3.t')
-rw-r--r-- | t/P3.t | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -5,26 +5,26 @@ use Test::More; use Image::PNM; -my $image = Image::PNM->new('t/data/P3.pnm'); +my $image = Image::PNM->new('t/data/P3.ppm'); -is($image->width, 8); +is($image->width, 6); is($image->height, 8); is($image->max_pixel_value, 255); -is_deeply($image->raw_pixel(1, 3), [0, 84, 255]); -is_deeply($image->pixel(4, 2), [1, 0, 0]); +is_deeply($image->raw_pixel(1, 2), [0, 84, 255]); +is_deeply($image->pixel(4, 1), [1, 0, 0]); is($image->as_string('P3'), <<IMAGE); P3 -8 8 +6 8 255 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -255 255 255 255 255 255 255 255 255 0 84 255 0 84 255 255 255 255 255 255 255 255 255 255 -255 255 255 255 255 255 0 0 0 255 255 255 255 255 255 0 0 0 255 255 255 255 255 255 -255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 255 255 255 -255 255 255 0 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 0 255 255 255 -255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 255 255 255 -255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 255 255 255 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 84 255 0 84 255 255 255 255 255 255 255 +255 255 255 0 0 0 255 255 255 255 255 255 0 0 0 255 255 255 +0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 +0 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 0 +0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 +0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 +255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 IMAGE done_testing; |