Image-Magick-Info

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Image::Magick::Info.

0.03  Fri Aug  5 10:10:00 2005
  - now handles IO::File and GLOB filehandles.

0.02  Thr Aug  4 22:00:00 2005
  - can now pass in a filehandle OR a filename to get_info().

0.01  Wed May  4 12:51:50 2005
	- original version;

Info.pm  view on Meta::CPAN

package Image::Magick::Info;

use strict;
use warnings;
use Carp;

require Image::Magick;

require Exporter;
use AutoLoader qw(AUTOLOAD);

our @ISA = qw(Exporter);

our @EXPORT_OK = qw( get_info );

our $VERSION = '0.03';

my $im = new Image::Magick;

sub get_info{
  my ($filename, @info ) = @_;

  if( ref $filename eq "GLOB" || ref $filename eq "IO::File" ){
    $im->Read( FILE => $filename );
  }else{
    $im->Read( $filename );
  }
  

Info.pm  view on Meta::CPAN

  return $ret;
}


1;
__END__


=head1 NAME

Image::Magick::Info - Retreive image attributes with Image::Magick.

=head1 SYNOPSIS

  use Image::Magick::Info qw( get_info );

  my $info = get_info("/users/aroth/Desktop/photo.jpg", ("filesize","width","height") );
  my $info = get_info( $FILE_HANDLE, ("filesize") );
  my $info = get_info( \*FILE, ("width","height") );


=head1 DESCRIPTION

This module is a thin wrapper over ImageMagick's getAttribute() function. There are
faster modules out there (which don't rely on ImageMagick) that you may want to check

Info.pm  view on Meta::CPAN

=head1 EXPORT

get_info( filename, array_of_attributes )

=head1 SEE ALSO

L<Image::Size>

L<Image::Info>

L<Image::Magick::Thumbnail::Fixed>

L<Image::Magick::Brand>

=head1 AUTHOR

Adam Roth, E<lt>aroth@cpan.orgE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright 2005 by Adam Roth

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself. 

=cut


L<Image::Info>

L<Image::Magick::Thumbnail::Fixed>

L<Image::Magick::Brand>

=head1 AUTHOR

Adam Roth, E<lt>aroth@cpan.orgE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright 2005 by Adam Roth

This library is free software; you can redistribute it and/or modify

Makefile.PL  view on Meta::CPAN

use 5.005001;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    NAME              => 'Image::Magick::Info',
    VERSION_FROM      => 'Info.pm', # finds $VERSION
    PREREQ_PM         => {}, # e.g., Module::Name => 1.1
    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
      (ABSTRACT_FROM  => 'Info.pm', # retrieve abstract from module
       AUTHOR         => 'Adam Roth <aroth@cpan.org>') : ()),
);

README  view on Meta::CPAN


   perl Makefile.PL
   make
   make test
   make install

DEPENDENCIES

This module requires these other modules and libraries:

Image::Magick

COPYRIGHT AND LICENCE

Put the correct copyright and licence information here.

Copyright (C) 2005 Adam Roth

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself. 

t/1.t  view on Meta::CPAN

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 1.t'

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test::More tests => 1;
BEGIN { use_ok('Image::Magick::Info') };

#########################

# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.



( run in 1.265 second using v1.01-cache-2.11-cpan-beeb90c9504 )