From 0c46370da3bdbc122b64a5811cad43b8cbdb5eab Mon Sep 17 00:00:00 2001 From: FRIGN Date: Tue, 17 Nov 2015 18:27:56 +0100 Subject: Add 2ff utility This is a wrapper for the different conversion utilities with filetype detection using file(1) and an imagemagick fallback. --- 2ff | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 2ff (limited to '2ff') diff --git a/2ff b/2ff new file mode 100755 index 0000000..8901c78 --- /dev/null +++ b/2ff @@ -0,0 +1,8 @@ +#!/bin/sh +FORMAT=`file -ib "$1" | cut -d ";" -f 1` + +if [ "$FORMAT" = "image/png" ]; then + png2ff < "$1" +else + convert "$1" png:- | png2ff +fi; -- cgit v1.2.3