summaryrefslogtreecommitdiff
path: root/2ff
diff options
context:
space:
mode:
authorFRIGN <dev@frign.de>2015-11-23 00:11:17 +0100
committerFRIGN <dev@frign.de>2015-11-23 00:11:17 +0100
commit2c4b975c421456bf14c2891a753da09b4a50cb0a (patch)
treea1215f6527b33a2874ea38ccbaab5451a88dd3a1 /2ff
parenta593273a24500f14c66e5ca0c2a9948db22f36a7 (diff)
(Re)add jpg2ff
Thanks z3bra for porting this! Also change 2ff to use case instead of if-blocks.
Diffstat (limited to '2ff')
-rwxr-xr-x2ff10
1 files changed, 5 insertions, 5 deletions
diff --git a/2ff b/2ff
index 8901c78..af4d7b3 100755
--- a/2ff
+++ b/2ff
@@ -1,8 +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;
+case "$FORMAT" in
+ image/png) png2ff < "$1" ;;
+ image/jpeg) jpg2ff < "$1" ;;
+ *) convert "$1" png:- | png2ff ;;
+esac