[cig-commits] [commit] master: Adding annotation to fig_fields_64_20000_y099.png (50012ed)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri May 9 15:26:19 PDT 2014


Repository : https://github.com/geodynamics/cigma

On branch  : master
Link       : https://github.com/geodynamics/cigma/compare/65c02138d3ae8b87c088cc14fe4f98e21e3f0805...a26f592c25c89a40622404999ba1effcdf6df9e3

>---------------------------------------------------------------

commit 50012ed398041ea26a30ce9cbb423377a063fd05
Author: Luis Armendariz <luis>
Date:   Wed Apr 1 14:06:58 2009 +0000

    Adding annotation to fig_fields_64_20000_y099.png


>---------------------------------------------------------------

50012ed398041ea26a30ce9cbb423377a063fd05
 figures3/bm2/out/fig_fields_64_20000_y099.png | Bin 0 -> 1400496 bytes
 figures3/bm2/process-images.sh                |  43 ++++++-------------
 figures3/common.sh                            |  58 ++++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 31 deletions(-)

diff --git a/figures3/bm2/out/fig_fields_64_20000_y099.png b/figures3/bm2/out/fig_fields_64_20000_y099.png
new file mode 100644
index 0000000..34251b9
Binary files /dev/null and b/figures3/bm2/out/fig_fields_64_20000_y099.png differ
diff --git a/figures3/bm2/process-images.sh b/figures3/bm2/process-images.sh
index e29653c..c0a9b21 100755
--- a/figures3/bm2/process-images.sh
+++ b/figures3/bm2/process-images.sh
@@ -3,6 +3,10 @@
 # See ../bm3/process-images.sh for comments
 #
 
+source ../common.sh
+
+set -x
+
 imglist="
     temperature_64_20000_y099.png
     velocity_64_20000_y099.png
@@ -22,37 +26,6 @@ for img in ${imglist}; do
 done
 cd ${tmp}
 
-function img-cat
-{
-    local tile=$1
-    shift
-    montage -tile ${tile} -mode Concatenate $*
-}
-
-function img-trim
-{
-    echo $1 ...trimming
-    convert -trim $1 $1
-}
-
-function img-add-border
-{
-    echo $1 ...adding border
-    convert -border $2 -bordercolor white $1 $1
-}
-
-function img-resize
-{
-    echo $1 ...resizing
-    convert -resize '80%' $1 $1
-}
-
-function cat-pair
-{
-    echo Concatenating $1 $2
-    img-cat 2x1 $1 $2 $3
-}
-
 
 # 
 # Start processing the images
@@ -63,6 +36,14 @@ for img in ${imglist}; do
     img-add-border ${img} 100
 done
 
+img-caption '(a) Temperature                           ' \
+    temperature_64_20000_y099.png \
+    temperature_64_20000_y099.png
+
+img-caption '(b) Velocity                     ' \
+    velocity_64_20000_y099.png \
+    velocity_64_20000_y099.png
+
 cat-pair \
     temperature_64_20000_y099.png \
     velocity_64_20000_y099.png \
diff --git a/figures3/common.sh b/figures3/common.sh
new file mode 100644
index 0000000..4685f0f
--- /dev/null
+++ b/figures3/common.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+#
+function img-caption0
+{
+    #echo $1 ...adding caption
+    convert \
+        -gravity south  \
+        -stroke '#000C' \
+        -strokewidth 2  \
+        -font Arial-Regular \
+        -pointsize 30 \
+        -annotate 0 "$1" \
+        $2 $3
+}
+
+function img-caption
+{
+    #echo $1 ...adding caption
+    montage \
+        -geometry +0+0 \
+        -background White \
+        -font Arial-Regular \
+        -pointsize 35 \
+        -label "$1" \
+        $2 $3
+}
+
+function img-cat
+{
+    local tile=$1
+    shift
+    montage -tile ${tile} -mode Concatenate $*
+}
+
+function img-trim
+{
+    #echo $1 ...trimming
+    convert -trim $1 $1
+}
+
+function img-add-border
+{
+    #echo $1 ...adding border
+    convert -border $2 -bordercolor white $1 $1
+}
+
+function img-resize
+{
+    #echo $1 ...resizing
+    convert -resize '80%' $1 $1
+}
+
+function cat-pair
+{
+    #echo Concatenating $1 $2
+    img-cat 2x1 $1 $2 $3
+}
+



More information about the CIG-COMMITS mailing list