From 37bdbc10a989b6bc6f2ff25bcf6d09d9c7217783 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 8 Oct 2026 15:12:38 +0200 Subject: [PATCH 1/2] Generate individual default cover photos for users based on the style colors --- .../templates/userProfileHeader.tpl | 2 +- .../files/lib/data/user/UserProfile.class.php | 16 +- .../photo/GeneratedUserCoverPhoto.class.php | 39 +++ .../generator/CoverPhotoGenerator.class.php | 310 ++++++++++++++++++ .../generator/CoverPhotoPalette.class.php | 43 +++ .../photo/generator/OklchColor.class.php | 166 ++++++++++ 6 files changed, 573 insertions(+), 3 deletions(-) create mode 100644 wcfsetup/install/files/lib/data/user/cover/photo/GeneratedUserCoverPhoto.class.php create mode 100644 wcfsetup/install/files/lib/system/image/cover/photo/generator/CoverPhotoGenerator.class.php create mode 100644 wcfsetup/install/files/lib/system/image/cover/photo/generator/CoverPhotoPalette.class.php create mode 100644 wcfsetup/install/files/lib/system/image/cover/photo/generator/OklchColor.class.php diff --git a/com.woltlab.wcf/templates/userProfileHeader.tpl b/com.woltlab.wcf/templates/userProfileHeader.tpl index abf18ae8c4a..c89e47c2d6b 100644 --- a/com.woltlab.wcf/templates/userProfileHeader.tpl +++ b/com.woltlab.wcf/templates/userProfileHeader.tpl @@ -30,7 +30,7 @@ {if $view->canEditCoverPhoto()}