photobooth icon indicating copy to clipboard operation
photobooth copied to clipboard

[FEATURE]: Rotate Picture after taken in Collage

Open MiVents opened this issue 1 month ago • 5 comments

Is your feature request related to a problem?

Yes

Description

My camera is hanging upside down. When I use the picture button there is an option to rotate the picture after taken. But this option is not available by a collage.

Describe the solution you'd like

Same option at picture: "Rotate photo after taking (in degrees)" available in the collage settings. This option is only visible in Advanced and Expert view.

Describe alternatives you've considered

I have tried some Linux commands in the post-photo command but this is only on the whole collage.

Additional context

No response

MiVents avatar Nov 01 '25 13:11 MiVents

Hey @MiVents currently you can use the custom collage option and rotate images as needed. See the documentation and description of layout setup: https://photoboothproject.github.io/faq/#how-can-setup-a-custom-collage-design

andi34 avatar Nov 01 '25 15:11 andi34

I think its only the photo result between steps that is upside down. The collage rendering was working perfectly with the settings in de Picture section.

MiVents avatar Nov 01 '25 16:11 MiVents

Guess you have the same result on single images if you enable "Preload and show image during filter processing" inside Adminpanel. For preview between capture the image is not manipulated.

You can use a custom script to capture the image and rotate it directly, e.g. using imagemagick. sudo apt install imagemagick -y

Quick example of script:

#!/bin/bash
# Usage: ./capture_and_rotate.sh /path/to/output.jpg

# Exit on error
set -e

# Check if parameter is provided
if [ -z "$1" ]; then
  echo "Usage: $0 /path/to/output.jpg"
  exit 1
fi

OUTPUT_PATH="$1"

# Step 1: Capture image using gphoto2
gphoto2 --capture-image-and-download --filename "$OUTPUT_PATH"

# Step 2: Rotate the image clockwise (adjust as needed)
convert "$OUTPUT_PATH" -rotate 180 "$OUTPUT_PATH"

exit 0

Use inside Photobooth

sudo -u www-data nano /var/www/html/private/capture_and_rotate.sh

Copy and paste the content, after that make executable

sudo chmod +x /var/www/html/private/capture_and_rotate.sh

Example in Photobooth as capture command:

bash /var/www/html/private/capture_and_rotate.sh %s 

andi34 avatar Nov 02 '25 10:11 andi34

After setting the flip vertical on the picture settings the collage were rendering fine, but the place holder image is sometimes flipped and some times not. Resulting in all the odd collages are fine and even collages have flipped placeholder images. Is it possible to disable flipping for placeholder images?

MiVents avatar Nov 11 '25 20:11 MiVents

I’m not very familiar with the PHP language. However, adding the IF statement with $i !== 3 in src/Collage.php prevents the placeholder image from being rotated. The issue can also be reproduced in the Collage Test, the placeholder image rotates every time the page is refreshed.

Image

MiVents avatar Nov 12 '25 09:11 MiVents