From 52c5581ffaa94429e6ff391625825bc98b0f528f Mon Sep 17 00:00:00 2001 From: Devdatt Bhatt Date: Wed, 20 May 2026 19:34:06 +0000 Subject: [PATCH] updated file --- encoder/app.php | 182 +++++++++++++++++++++++++----------------------- 1 file changed, 95 insertions(+), 87 deletions(-) diff --git a/encoder/app.php b/encoder/app.php index 49e8f99..84ab432 100644 --- a/encoder/app.php +++ b/encoder/app.php @@ -49,8 +49,8 @@ if (isset($_POST['submit'])) { } // 2. Determine target dimensions - $target_width = ($input_name === 'app_logo') ? 256 : 1080; - $target_height = ($input_name === 'app_logo') ? 256 : 1080; + $target_width = ($input_name === 'app_logo') ? 128 : 256; + $target_height = ($input_name === 'app_logo') ? 128 : 256; // 3. Load the source image $src_img = @imagecreatefrompng($tmp_path); @@ -64,7 +64,7 @@ if (isset($_POST['submit'])) { // 5. Preserve transparency for PNG imagealphablending($dst_img, false); - imagesavealpha($dst_img, true); + imagesavealpha($png_alpha = $dst_img, true); $transparent = imagecolorallocatealpha($dst_img, 255, 255, 255, 127); imagefill($dst_img, 0, 0, $transparent); @@ -144,35 +144,41 @@ function getValue($data, $key) include 'header.php'; ?> + +