Imager::Filter::ExifOrientation - Imager::ExifOrientation for Imager Filter
use file path
use Imager; use Imager::Filter::ExifOrientation; my $img = Imager->new; $img->filter( type => 'exif_orientation', path => 'foo.jpg', );
use jpeg data
use Imager; use Imager::Filter::ExifOrientation; my $jpeg_data = do { open my $fh, '<', 'foo.jpg'; local $/; <$fh>; }; $img->filter( type => 'exif_orientation', data => $jpeg_data, );
use exif hash
use Imager; use Imager::Filter::ExifOrientation; use Image::ExifTool 'ImageInfo'; my $exif = ImageInfo('foo.jpg'); $img->filter( type => 'exif_orientation', exif => $exif, );
use orientation number
use Imager; use Imager::Filter::ExifOrientation; $img->filter( type => 'exif_orientation', orientation => 1, # or 2..8 ); # orientation values # 1 => Horizontal (normal) # 2 => Mirror horizontal # 3 => Rotate 180 (rotate is too noisy) # 4 => Mirror vertical # 5 => Mirror horizontal and rotate 270 CW # 6 => Rotate 90 CW # 7 => Mirror horizontal and rotate 90 CW # 8 => Rotate 270 CW
Kazuhiro Osawa <yappo <at> shibuya <döt> pl>
Imager, Imager::Filter, Image::ExifTool, Imager::ExifOrientation
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Imager::ExifOrientation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Imager::ExifOrientation
CPAN shell
perl -MCPAN -e shell install Imager::ExifOrientation
For more information on module installation, please visit the detailed CPAN module installation guide.