From 4868a9018cafe91bb4cef87bac1def85ecb3032e Mon Sep 17 00:00:00 2001
From: Toke Eskildsen <te@ekot.dk>
Date: Sun, 17 Nov 2013 00:07:52 +0100
Subject: [PATCH] Added requirements to the in-file documentation

---
 analyze.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/analyze.sh b/analyze.sh
index 7624c7b..65d47a6 100755
--- a/analyze.sh
+++ b/analyze.sh
@@ -3,6 +3,8 @@
 #
 # Statistical helper functions for greyscale images.
 #
+# Requirements: ImageMagick's identify and convert
+#
 
 # Input: image
 # Sample: foo.png
@@ -21,9 +23,10 @@ function im_identify() {
     rm "$TMP"
 }
 
-
+# Produces a histogram over greyscale intensities in the given image
 # Input: image height log
 # Sample: foo.jpg 200 true
+# Output: foo.png (256 x height pixels) with the histogram
 function histogram() {
     local SRC="$1"
     local HEIGHT=$2
@@ -106,11 +109,10 @@ function histogram() {
                 echo -n -e \\xff >> $HTMP
             fi
         done
-#        echo "$G $COUNT $PIXELS $HTMP"
+        echo "$G $COUNT $PIXELS"
     done
     convert -rotate 270 $HTMP "$DEST"
     rm $HTMP
-    
 }
 
 #histogram $1 200 false
-- 
GitLab