Kazuhiro Osawa > Imager-ExifOrientation > Imager::Filter::ExifOrientation

Download:
Imager-ExifOrientation-0.07.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Imager::Filter::ExifOrientation - Imager::ExifOrientation for Imager Filter

SYNOPSIS ^

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

AUTHOR ^

Kazuhiro Osawa <yappo <at> shibuya <döt> pl>

SEE ALSO ^

Imager, Imager::Filter, Image::ExifTool, Imager::ExifOrientation

LICENSE ^

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

syntax highlighting: