• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/perl
2#  Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
3#  dedicated to making software imaging solutions freely available.
4#
5#  You may not use this file except in compliance with the License.  You may
6#  obtain a copy of the License at
7#
8#    https://imagemagick.org/script/license.php
9#
10#  Unless required by applicable law or agreed to in writing, software
11#  distributed under the License is distributed on an "AS IS" BASIS,
12#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13#  See the License for the specific language governing permissions and
14#  limitations under the License.
15#
16# Test getting attributes.
17#
18BEGIN { $| = 1; $test=1, print "1..25\n"; }
19END {print "not ok 1\n" unless $loaded;}
20use Image::Magick;
21$loaded=1;
22
23require 't/subroutines.pl';
24
25chdir 't' || die 'Cd failed';
26
27testGetAttribute('input.miff','base-columns','70');
28
29++$test;
30testGetAttribute('input.miff','base-filename','input.miff');
31
32++$test;
33testGetAttribute('input.miff','base-rows','46');
34
35++$test;
36testGetAttribute('input.miff','class','DirectClass');
37
38++$test;
39testGetAttribute('input.miff','colors','3019');
40
41++$test;
42testGetAttribute('input.miff','columns','70');
43
44++$test;
45testGetAttribute('input.miff','directory',undef);
46
47++$test;
48testGetAttribute('input.miff','gamma','0.454545');
49
50++$test;
51testGetAttribute('input.miff','geometry',undef);
52
53++$test;
54testGetAttribute('input.miff','height','46');
55
56++$test;
57# Returns undef
58testGetAttribute('input.miff','label',undef);
59
60++$test;
61testGetAttribute('input.miff','matte','0');
62
63++$test;
64testGetAttribute('input.miff','error','0');
65
66++$test;
67testGetAttribute('input.miff','montage',undef);
68
69++$test;
70testGetAttribute('input.miff','maximum-error','0');
71
72++$test;
73testGetAttribute('input.miff','mean-error','0');
74
75++$test;
76testGetAttribute('input.miff','rows','46');
77
78++$test;
79testGetAttribute('input.miff','signature',
80  'f7b3db46d6f696ea8392f0ad0be945dd502a806e2c1e9c082efef517191758f7');
81
82++$test;
83testGetAttribute('input.miff','texture',undef);
84
85++$test;
86testGetAttribute('input.miff','type','TrueColor');
87
88++$test;
89testGetAttribute('input.miff','units','undefined units');
90
91++$test;
92testGetAttribute('input.miff','view',undef);
93
94++$test;
95testGetAttribute('input.miff','width','70');
96
97++$test;
98testGetAttribute('input.miff','x-resolution','72');
99
100++$test;
101testGetAttribute('input.miff','y-resolution','72');
102
1031;
104