| File-Headerinfo documentation | Contained in the File-Headerinfo distribution. |
File::Headerinfo::Image - an extractor of useful information from image files.
File::Headerinfo::Image is a thin (going on invisible) wrapper around Image::Size, which is able to retrieve dimensions from most types of image file.
Copyright 2004 William Ross (wross@cpan.org)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Delivery, Delivery::Clip, Delivery::Clip::File, Delivery::Clip::File::Reader
| File-Headerinfo documentation | Contained in the File-Headerinfo distribution. |
package File::Headerinfo::Image; use strict; use base qw(File::Headerinfo); use Image::Size;
sub parse_file { my $self = shift; my ($w, $h, $type) = Image::Size::imgsize( $self->path ); return unless $w; $self->filetype(lc($type)); $self->width($w); $self->height($h); }
1;