| 1 | package File::Headerinfo::Image; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use base qw(File::Headerinfo); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Image::Size; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | =head1 NAME | ||||||||||
| 8 | |||||||||||
| 9 | File::Headerinfo::Image - an extractor of useful information from image files. | ||||||||||
| 10 | |||||||||||
| 11 | =head1 DESCRIPTION | ||||||||||
| 12 | |||||||||||
| 13 | I<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. | ||||||||||
| 14 | |||||||||||
| 15 | =cut | ||||||||||
| 16 | |||||||||||
| 17 | 2 | ▶ | sub parse_file { | ||||||||
|
Subroutine
parse_file: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 18 | 2 | my $self = shift; | |||||||||
| 19 | 2 | my ($w, $h, $type) = Image::Size::imgsize( $self->path ); | |||||||||
| 20 | 2 | ▶ | return unless $w; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 2 | $self->filetype(lc($type)); | |||||||||
| 22 | 2 | $self->width($w); | |||||||||
| 23 | 2 | $self->height($h); | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | =head1 COPYRIGHT | ||||||||||
| 27 | |||||||||||
| 28 | Copyright 2004 William Ross (wross@cpan.org) | ||||||||||
| 29 | |||||||||||
| 30 | This library is free software; you can redistribute it | ||||||||||
| 31 | and/or modify it under the same terms as Perl itself. | ||||||||||
| 32 | |||||||||||
| 33 | =head1 SEE ALSO | ||||||||||
| 34 | |||||||||||
| 35 | L<Delivery>, L<Delivery::Clip>, L<Delivery::Clip::File>, L<Delivery::Clip::File::Reader> | ||||||||||
| 36 | |||||||||||
| 37 | =cut | ||||||||||
| 38 | |||||||||||
| 39 | 1 | 1; | |||||||||