diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-07 13:38:16 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-07 13:38:16 -0400 |
commit | 34123b9d0460b50118a76290aafa0fc31eb365b1 (patch) | |
tree | 68ea9f0f025a63fbf0de3d9a069fe1e7c6e55976 /t | |
parent | 35a0bc2f82802800bdb0769882d667d59313f141 (diff) | |
download | image-pnm-34123b9d0460b50118a76290aafa0fc31eb365b1.tar.gz image-pnm-34123b9d0460b50118a76290aafa0fc31eb365b1.zip |
add some accessors
Diffstat (limited to 't')
-rw-r--r-- | t/P3.t | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -6,6 +6,13 @@ use Test::More; use Image::PNM; my $image = Image::PNM->new('t/data/P3.pnm'); + +is($image->width, 8); +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($image->as_string('P3'), <<IMAGE); P3 8 8 |