Create 360° PhotoSphere Greetings on Alpine Linux
--output from https://gemini.google.com/appSubject: [How-To] Create 360° PhotoSphere Greetings on Alpine Linux (Pi 400)
Introduction
I’ve developed a lightweight workflow for creating 360° equirectangular PhotoSpheres using Alpine Linux on a Raspberry Pi 400. This is perfect for New Year greetings or immersive virtual cards. It uses LibreOffice Draw for design and ExifTool for metadata injection, staying well under the 4GB RAM limit.
1. Prerequisites
Alpine is minimal, so first, install the necessary tools:
Bash
sudo apk add bash exiftool gimp libreoffice
Note: GIMP and LibreOffice are used for the GUI design phase.
2. Design Phase (LibreOffice Draw)
Since we need an exact 2:1 aspect ratio for 360 viewers, we use a 4K resolution target ($4096 \times 2048$ pixels).
Open LibreOffice Draw.
Go to Page > Page Properties.
Set units to Inches.
Set Width: 42.67 in and Height: 21.33 in (This translates to $4096 \times 2048$ px at 96 DPI).
Design Tip: Place your main greeting/text in the vertical center. The top and bottom 20% of the page will be warped into the "poles" of the sphere.
Export: File > Export... > Select JPG. In the dialog, force the dimensions to 4096 px x 2048 px.
3. Fixing Polar Distortion (Optional/GIMP)
If you want a logo on the "floor" or "ceiling" without it looking stretched:
Open your JPG in GIMP.
Go to Filters > Distorts > Polar Coordinates.
Uncheck To Polar to turn the rectangle into a circular view of the pole.
Add your text/logo, then re-run the filter with To Polar checked to "wrap" it back into the equirectangular format.
4. Metadata Injection (The "Secret Sauce")
A standard JPG won't "scroll" in 360° unless it has XMP metadata. Save the following as make360.sh:
Bash
#!/usr/bin/env bash
# Usage: ./make360.sh your_image.jpg
if [ -z "$1" ]; then
echo "Usage: ./make360.sh <filename>"
exit 1
fi
# Fetch dimensions automatically
W=$(exiftool -s -s -s -ImageWidth "$1")
H=$(exiftool -s -s -s -ImageHeight "$1")
exiftool -overwrite_original \
-ProjectionType="equirectangular" \
-UsePanoramaViewer=True \
-FullPanoWidthPixels=$W \
-FullPanoHeightPixels=$H \
-CroppedAreaImageWidthPixels=$W \
-CroppedAreaImageHeightPixels=$H \
-CroppedAreaLeftPixels=0 \
-CroppedAreaTopPixels=0 \
"$1"
echo "Done! Metadata injected for $W x $H sphere."
5. Final Step
Run the script:
Bash
chmod +x make360.sh
./make360.sh greeting.jpg
The resulting file can be uploaded to Google Photos, Facebook, or Kuula.co, where it will be recognized as a fully interactive 360° environment.
Performance on Pi 400:
On Alpine edge, this entire process uses less than 400MB of RAM (8% usage) until GIMP is opened. Even then, the BCM2711 handles the coordinate transformation smoothly.
home/ubu # fastfetch --logo small
/\ /\ ubu@localhost
// \ \ -------------
// \ \ OS: Alpine Linux edge aarch64
/// \ \ Host: Raspberry Pi 400 Rev 1.0
// \ \ Kernel: Linux 6.12.60-0-rpi
\ Uptime: 1 hour, 46 mins
Packages: 758 (apk)
Shell: sh
Display ( EZCAP28X): 1920x1080 in 22", 60 Hz [External]
Terminal: /dev/pts/0 10.2p1
CPU: BCM2711 (4) @ 1.80 GHz
GPU: Broadcom bcm2711-vc5 [Integrated]
Memory: 328.22 MiB / 3.71 GiB (9%)
Swap: Disabled
Disk (/): 6.62 GiB / 111.96 GiB (6%) - ext4 [External]
Local IP (eth0): 192.168.1.194/24
Locale: C.UTF-8
/home/ubu #
https://kuula.co/share/hryN6?logo=1&inf ... 8&thumbs=1
Statistics: Posted by geev03 — Wed Dec 31, 2025 4:09 pm