Unverified Commit 8867b41a authored by Martijn Braam's avatar Martijn Braam
Browse files

Support graphicsmagick as alternative to imagemagick

parent 349d2c5a
......@@ -43,6 +43,18 @@ then
set --
fi
CONVERT=""
if command -v "convert" > /dev/null
then
CONVERT="convert"
# -fbdd 1 Raw denoising with FBDD
set -- -fbdd 1
elif command -v "gm" > /dev/null
then
CONVERT="gm"
fi
if [ -n "$DCRAW" ]; then
# +M use embedded color matrix
# -H 4 Recover highlights by rebuilding them
......@@ -52,9 +64,13 @@ if [ -n "$DCRAW" ]; then
$DCRAW +M -H 4 -o 1 -q 3 -T "$@" "$MAIN_PICTURE.dng"
# If imagemagick is available, convert the tiff to jpeg and apply slight sharpening
if command -v convert > /dev/null
if [ -n "$CONVERT" ];
then
convert "$MAIN_PICTURE.$TIFF_EXT" -sharpen 0x1.0 "$TARGET_NAME.jpg"
if [ "$CONVERT" == "convert" ]; then
convert "$MAIN_PICTURE.$TIFF_EXT" -sharpen 0x1.0 "$TARGET_NAME.jpg"
else
gm convert "$MAIN_PICTURE.$TIFF_EXT" -sharpen 0x1.0 "$TARGET_NAME.jpg"
fi
# If exiftool is installed copy the exif data over from the tiff to the jpeg
# since imagemagick is stupid
......@@ -75,3 +91,4 @@ fi
# Clean up the temp dir containing the burst
rm -rf "$BURST_DIR"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment