A repository for the small scripts I create to solve practical problems.
Find a file
robinmonks 949fd9c517 Update README.md
Adding documentation for first script.
2025-11-15 20:39:05 +01:00
LICENSE Initial commit 2025-11-15 20:28:33 +01:00
make_hdr_backgrounds.sh Added first script 2025-11-15 20:34:13 +01:00
README.md Update README.md 2025-11-15 20:39:05 +01:00

Robin's Scripts

A small collection of practical, task-oriented scripts.


make_hdr_backgrounds.sh

Creates responsive background images while preserving full HDR/gain-map data using the hdr-resize tool from
https://github.com/sjml/hdr-resize.

Usage

./make_hdr_backgrounds.sh <input.(jpg|heic)> <output_dir> <basename>

Example

./make_hdr_backgrounds.sh hero.heic ./out hero

Output

Files emitted (JPEG + gain-map):

<output_dir>/<basename>-1280.jpg
<output_dir>/<basename>-1920.jpg
…
<output_dir>/<basename>-4096.jpg

Notes

  • Always outputs JPEG with embedded gain-map for maximum browser compatibility.
  • Uses hdr-resize with --input, --output, --size-string, and --quality.
  • Override JPEG quality using the QUALITY environment variable (default: 85).