Skip to content

Commit f318fe0

Browse files
author
rvelices
committed
don't rotate several times derivatives
git-svn-id: http://piwigo.org/svn/trunk@13848 68402e56-0260-453c-a942-63ccdbb3a9ee
1 parent 8bce8f0 commit f318fe0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

i.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ function try_switch_source(DerivativeParams $params, $original_mtime)
321321
$params->sharpen = min(1, $params->sharpen);
322322
$page['src_path'] = $candidate_path;
323323
$page['src_url'] = $page['root_path'] . substr($candidate_path, strlen(PHPWG_ROOT_PATH));
324+
$page['rotation_angle'] = 0;
324325
}
325326
}
326327

@@ -509,9 +510,11 @@ class json_response
509510
$changes = 0;
510511

511512
// rotate
512-
if (0 != $page['rotation_angle'])
513+
if (0 != (int)$page['rotation_angle'])
513514
{
514515
$image->rotate($page['rotation_angle']);
516+
$changes++;
517+
$timing['rotate'] = time_step($step);
515518
}
516519

517520
// Crop & scale

0 commit comments

Comments
 (0)