From 9ff2ed319d7a3b6671e90d6004fcc191f2e3717e Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Sat, 15 Aug 2026 15:47:15 +0200 Subject: [PATCH] Use base watermark size for new profiles --- tools/watermark_profiles.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/watermark_profiles.inc.php b/tools/watermark_profiles.inc.php index c9c51bd..7ee37bd 100644 --- a/tools/watermark_profiles.inc.php +++ b/tools/watermark_profiles.inc.php @@ -87,11 +87,12 @@ function bratonien_tools_save_watermark_profile() { $table = bratonien_tools_table('watermark_profiles'); $id = (int)($_POST['profile_id'] ?? 0); + $base_scale = function_exists('bratonien_tools_get_base_watermark_scale') ? bratonien_tools_get_base_watermark_scale() : 100.0; $data = array( 'name' => trim((string)($_POST['profile_name'] ?? '')), 'watermark_file' => bratonien_tools_validate_profile_file($_POST['profile_file'] ?? ''), - 'scale_percent' => bratonien_tools_profile_scale_percent($_POST['profile_scale_percent'] ?? 100), + 'scale_percent' => bratonien_tools_profile_scale_percent($_POST['profile_scale_percent'] ?? null, $id > 0 ? 100.0 : $base_scale), 'xpos' => max(0, min(100, (int)($_POST['profile_xpos'] ?? 90))), 'ypos' => max(0, min(100, (int)($_POST['profile_ypos'] ?? 90))), 'xrepeat' => max(0, min(20, (int)($_POST['profile_xrepeat'] ?? 0))),