Skip to content

Commit

Permalink
applyFrame: adding casting to in to avoid parsererror
Browse files Browse the repository at this point in the history
  • Loading branch information
fmiccolis authored and andi34 committed Nov 29, 2022
1 parent 890a81e commit 45b42d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/applyFrame.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function applyFrame($sourceResource, $framePath) {
$dst_y = 0;

if ($pic_height == $frame_height) {
$dst_x = ($pic_width - $frame_width) / 2;
$dst_x = intval(($pic_width - $frame_width) / 2);
} else {
$dst_y = ($pic_height - $frame_height) / 2;
$dst_y = intval(($pic_height - $frame_height) / 2);
}

imagecopy($sourceResource, $frame, $dst_x, $dst_y, 0, 0, $frame_width, $frame_height);
Expand Down

0 comments on commit 45b42d3

Please sign in to comment.