From 45b42d344db232456f2fc34a4bfa1975402727fa Mon Sep 17 00:00:00 2001 From: Francesco Date: Wed, 9 Nov 2022 13:28:54 +0100 Subject: [PATCH] applyFrame: adding casting to in to avoid parsererror --- lib/applyFrame.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/applyFrame.php b/lib/applyFrame.php index 20fe1ea1d..65c0135f9 100644 --- a/lib/applyFrame.php +++ b/lib/applyFrame.php @@ -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);