Rotation was fixed
This commit is contained in:
parent
112aa4b48f
commit
21f362c5f5
1 changed files with 2 additions and 2 deletions
|
@ -172,7 +172,6 @@ post '/upload' => (authenticated => 1)=> sub {
|
|||
my $rotation_angle = $imager->tags( name => "exif_orientation") || 1;
|
||||
$self->app->log->info("Rotation angle [".$rotation_angle."] [".$image->filename."]");
|
||||
|
||||
for my $scale (@scale_width) {
|
||||
if ($rotation_angle == 3) {
|
||||
$imager = $imager->rotate(degrees=>180);
|
||||
}
|
||||
|
@ -180,6 +179,7 @@ post '/upload' => (authenticated => 1)=> sub {
|
|||
$imager = $imager->rotate(degrees=>90);
|
||||
}
|
||||
|
||||
for my $scale (@scale_width) {
|
||||
my $scaled = $imager->scale(xpixels => $scale);
|
||||
|
||||
$scaled->write(file => File::Spec->catfile($IMAGE_DIR, $scale, $filename)) or die $scaled->errstr;
|
||||
|
|
Loading…
Reference in a new issue