Skip to content

Instantly share code, notes, and snippets.

@patleeman
Created April 23, 2025 20:39
Show Gist options
  • Save patleeman/e0ab68149f363664a3c89098b0b0f191 to your computer and use it in GitHub Desktop.
Save patleeman/e0ab68149f363664a3c89098b0b0f191 to your computer and use it in GitHub Desktop.
Sunsplode HDR Script
#!/bin/bash
# Crate a gif of a sunsplode effect on an image
# Usage: ./sunsplode.sh input.png
input="$1"
base="${input%.*}"
output="${base}-sunsplode.gif"
# Create output directory
mkdir -p "${base}-sunsplode"
# Loop through increments of 0.1 from 0.1 to 2.0
for i in $(seq 0.6 0.2 3.0) $(seq 3.0 -0.2 0.6); do
# Use a counter for sequential file naming
counter=$((counter + 1))
multiplier=$(printf "%.1f" "$i")
output_file="${base}-sunsplode/frame_$(printf "%03d" $counter).png"
magick "$input" \
-define quantum:format=floating-point \
-colorspace RGB \
-auto-gamma \
-evaluate Multiply "$multiplier" \
-evaluate Pow 0.9 \
-colorspace sRGB \
-depth 16 \
-profile ~/.dotfiles/bin/2020_profile.icc \
"$output_file"
echo "Created $output_file"
done
magick "${base}-sunsplode/frame_*.png" -delay 0 -loop 0 "${output}"
rm -rf "${base}-sunsplode"
echo "Created ${output}"
@patleeman
Copy link
Author

bufos_hat-sunsplode
worry-froge-froge-sunsplode

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