Skip to content

Add collage background overlay render mode toggle#1545

Open
paaaaaaul0101 wants to merge 8 commits into
PhotoboothProject:devfrom
paaaaaaul0101:pr/collage-background-render-mode
Open

Add collage background overlay render mode toggle#1545
paaaaaaul0101 wants to merge 8 commits into
PhotoboothProject:devfrom
paaaaaaul0101:pr/collage-background-render-mode

Conversation

@paaaaaaul0101

@paaaaaaul0101 paaaaaaul0101 commented May 11, 2026

Copy link
Copy Markdown
Contributor

Prerequisites checklist

  • I have read the contributing guidelines.

What is the purpose of this pull request? (put an "x" next to an item)

  • Documentation update
  • Bug fix
  • New feature
  • Other, please explain:

What changes did you make? (Give an overview)

  • Added a new collage setting background_render_mode with two modes:
    • behind_images (current/default behavior)
    • overlay_frame (new mode)
  • Extended collage rendering in src/Collage.php:
    • behind_images: background first, then images
    • overlay_frame: images first, then background as overlay frame
  • Kept transparency behavior for overlay backgrounds so transparent areas stay see-through and reveal images below.
  • Added config support in src/Configuration/Section/CollageConfiguration.php with default behind_images.
  • Added DTO + factory mapping:
    • src/Dto/CollageConfig.php
    • src/Factory/CollageConfigFactory.php
  • Updated admin UI setting in lib/configsetup.inc.php:
    • rendered as toggle switch (checkbox) instead of select
    • ON => overlay_frame, OFF => behind_images
  • Added boolean-to-enum normalization in config schema for compatibility with checkbox form submission.
  • Added/updated i18n texts in:
    • resources/lang/en.json
    • resources/lang/de.json
      including manual description in “If enabled / Wenn aktiviert …” style.

Tests:

  • php -l on changed PHP files
  • JSON validation for resources/lang/en.json and resources/lang/de.json
  • Runtime collage creation test for both modes (behind_images and overlay_frame) completed successfully
  • Verified config normalization:
    • true -> overlay_frame
    • false -> behind_images
  • Text on collage

Is there anything you'd like reviewers to focus on?

AI used to create this Pull Request?

I used AI selectively in the code, for minor suggestions, alternatives or for understanding.
The idea, concept and logic behind the changes are my own.

@paaaaaaul0101

Copy link
Copy Markdown
Contributor Author

The current approach of placing images on top of the collage background works fine for simple layouts, but it becomes limiting for more advanced collage designs. Decorative elements such as frames, shadows, stickers, polaroid effects, gold borders, or overlapping graphics cannot properly interact with the images because the photos are always rendered above everything else.

The idea behind this change is to treat the collage background more like a real overlay or frame. The images should be rendered first, and then the designed collage background should be placed on top of them. The background itself contains transparent cutouts or “holes” where the images remain visible.

This makes it possible to create much more professional and visually polished collage designs:

  • images can appear naturally framed
  • decorative elements can overlap the photos
  • layouts feel less flat
  • more premium and complex collage styles become possible
  • the final result looks closer to real print design instead of simple image layering

The feature should remain optional so both the current simple rendering behavior and the new overlay/frame-based rendering mode are supported.

@reloxx13

Copy link
Copy Markdown
Collaborator

The collage frame is already ON TOP of the images for me?

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants