1Image::Info::XPM(3) User Contributed Perl Documentation Image::Info::XPM(3)
2
3
4
6 Image::Info::XPM - XPM support for Image::Info
7
9 use Image::Info qw(image_info dim);
10
11 my $info = image_info("image.xpm");
12 if (my $error = $info->{error}) {
13 die "Can't parse image info: $error\n";
14 }
15 my $color = $info->{color_type};
16
17 my($w, $h) = dim($info);
18
20 This modules supplies the standard key names except for Compression,
21 Gamma, Interlace, LastModificationTime, as well as:
22
23 ColorPalette
24 Reference to an array of all colors used. This key is only present
25 if "image_info" is invoked as "image_info({ColorPalette>=1})".
26
27 ColorTableSize
28 The number of colors the image uses.
29
30 HotSpotX
31 The x-coord of the image's hotspot. Set to -1 if there is no
32 hotspot.
33
34 HotSpotY
35 The y-coord of the image's hotspot. Set to -1 if there is no
36 hotspot.
37
38 L1D_Histogram
39 Reference to an array representing a one dimensioanl luminance his‐
40 togram. This key is only present if "image_info" is invoked as
41 "image_info($file, L1D_Histogram=>1)". The range is from 0 to 255,
42 however auto-vivification is used so a null field is also 0, and
43 the array may not actually contain 255 fields.
44
45 XPM_CharactersPerPixel
46 This is typically 1 or 2. See Image::Xpm.
47
48 XPM_Extension-.*
49 XPM Extensions (the most common is XPMEXT) if present.
50
52 process_file()
53
54 $info->process_file($source, $options);
55
56 Processes one file and sets the found info fields in the $info object.
57
60 This module requires Image::Xpm
61
62 $Image::Info::XPM::RGBLIB is set to /usr/share/X11/rgb.txt by default,
63 this is used to resolve textual color names to their RGB counterparts.
64
66 Image::Info, Image::Xpm
67
69 For more information about XPM see:
70
71 ftp://ftp.x.org/contrib/libraries/xpm-README.html
72
74 While the module attempts to be as robust as possible, it may not rec‐
75 ognize older XBMs (Versions 1-3), if this is the case try inserting
76 /* XPM */ as the first line.
77
79 Jerrad Pierce <belg4mit@mit.edu>/<webmaster@pthbb.org>
80
81 Now maintained by Tels - (c) 2006.
82
83 This library is free software; you can redistribute it and/or modify it
84 under the same terms as Perl itself.
85
86
87
88perl v5.8.8 2006-03-04 Image::Info::XPM(3)