summaryrefslogtreecommitdiff
path: root/farbfeld/2ff
diff options
context:
space:
mode:
authorstkhan <personal@slickd.xyz>2022-06-20 19:54:29 +0000
committerstkhan <personal@slickd.xyz>2022-06-20 19:54:29 +0000
commit4c40a4dc245f7715f4891ed02d71475628e7a959 (patch)
treefa52419490b5a0d89d746f6e3a0b0c1e675b7726 /farbfeld/2ff
parent513b0e238b98f72a01d740a0bd99a3739918645c (diff)
new directory structure
Diffstat (limited to 'farbfeld/2ff')
-rwxr-xr-xfarbfeld/2ff38
1 files changed, 0 insertions, 38 deletions
diff --git a/farbfeld/2ff b/farbfeld/2ff
deleted file mode 100755
index 6ce91b9..0000000
--- a/farbfeld/2ff
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# arguments
-if [ "$#" -ne 0 ]; then
- echo "usage: $0" >&2
- exit 1
-fi
-
-# write input into temporary file
-TMP=$(mktemp)
-trap 'rm "$TMP"' EXIT
-cat > "$TMP"
-
-# determine the mime-type
-if [ "$(dd if="$TMP" bs=1 count=8 2>/dev/null | tr -d '\0')" = "farbfeld" ]; then
- cat "$TMP"
-else
- MIME=$(file -ib "$TMP" | cut -d ";" -f 1)
-
- case "$MIME" in
- image/png)
- png2ff < "$TMP"
- ;;
- image/jpeg)
- jpg2ff < "$TMP"
- ;;
- *)
- convert "$TMP" png:- | png2ff
- ;;
- esac
-fi
-
-# errors
-if [ $? -ne 0 ]; then
- exit 1
-else
- exit 0
-fi