#! /bin/bash
# Last edited on 2009-12-26 16:43:32 by stolfi

# Should create files "p.sizes" in each directory, and use them...

export PATH="${STOLFIHOME}/EXPORT/images/tools/bin:${PATH}"

# *** IMPORTANT PARAMETERS *******************************************************
today="2009-12-22" # Date when this script was executed.
junkthem=0         # Set this to 1 to move all images to JUNK
testonly=0         # If 1 just prints the commands without executing.

function mov() {
  sdir="$1"; shift  # Directory of source image name.
  snum="$1"; shift  # Variable part of source image name.
  pdir="$1"; shift  # Parent diretory of destination image directory.
  dnum="$1"; shift  # Variable part of destination image directory.
  when="$1"; shift  # Date and time image was taken.
  who="$1"; shift   # Who took the photo.
  cam="$1"; shift   # Device used to produce the image.
  keep=$1; shift    # 1 to keep image, 0 to junk it.
  siz="$1"; shift   # Resize parameter for "convert". 
  rot="$1"; shift   # Rotation parameter for "convert".
  ops="$1"; shift   # Image quality codes (e.g. "(ZCT)"; see below).
  cmt="$1"; shift   # Contents to place in "p.comments". 

  # (J) Junk it.
  # (K) Keep it

  # (N) needs no rotation.
  # (R) needs rotation by 90 degree ccw
  # (Z) needs a lot of cropping 
  # (C) needs non-trivial color correction

  # (S) sharp and good enough to remain as JPEG original size.
  # (P) sharp, convert to PNG with reduction to 2/3 of original size.
  # (H) lightly blurred, needs reduction to about 1/2(???) size.
  # (T) lightly blurred, needs reduction to about 1/3(???) size.
  # (Q) blurred, needs reduction to about 1/4(???) size.
  # (U) too blurry, unusable.
  
  sfile="${sdir}/${snum}"
  ddir="${pdir}/${dnum}"
  dfile="${ddir}/orig.png"
  cmtfile="${ddir}/p.comments"
  
  printf "%s\n" "--- ${sfile} --> ${dfile} ---"
  
  aut="Photo taken ${when} {by ${who}} with ${cam}"

  if [[ testonly -ne 0 ]]; then
    echo "convert ${sfile} -resize "${siz}" -rotate "${rot}" ${dfile}"  >&2;
    echo "${cmt}." | fmt --split-only  >&2;
    echo "${aut}." | fmt --split-only  >&2;
    return
  fi
  
  if [[ ${junkthem} -eq 0 ]]; then
    if [[ ${keep} -eq 0 ]]; then
      echo '!! image skipped'  >&2;
      return
    fi
    # Create a directory for image:
    if [[ ! -d ${ddir} ]] ; then mkdir -p ${ddir} ; fi
    # Create the comments file:
    echo "${cmt}." | fmt --split-only > ${cmtfile}
    echo "${aut}." | fmt --split-only >> ${cmtfile}
    cat ${cmtfile}  >&2;
    # Create the "orig" image file:
    convert ${sfile} -resize "${siz}" -rotate "${rot}" ${dfile}
    ls -l ${dfile}
    display -title "${dnum}/%f" ${dfile}
  else
    if [[ ! -d ${jdir} ]] ; then mkdir -p ${jdir} ; fi
    mv -vi ${sfile} ${jdir}
  fi
}

# Source templates

temp="${STOLFIHOME}/EXPORT/images/temp"
ptmp="${STOLFIHOME}/EXPORT/images/photos/TEMP"

# Destination templates

dtri="${STOLFIHOME}/EXPORT/images/photos/animals"
drsa="${STOLFIHOME}/EXPORT/images/photos/events/2008-04-sand-phd"

dmug="${STOLFIHOME}/EXPORT/images/photos/people"
even="${STOLFIHOME}/EXPORT/images/photos/events"
misc="${STOLFIHOME}/EXPORT/images/photos/misc"
land="${STOLFIHOME}/EXPORT/images/photos/landscapes"
capa="${STOLFIHOME}/EXPORT/images/photos/figures/covers"
plan="${STOLFIHOME}/EXPORT/images/photos/plants"

nada="/dev/null"

export jdir="${STOLFIHOME}/EXPORT/images/JUNK/processed/${today}"

export cvt=( tools/bin/convert-and-crop-original-images -show )

${cvt[@]} -crop   10   5  630  450 -size  640  480 photos/landscapes/ic-bldg-1/orig.png

exit 0

# DONE:

nest="Nest of {Trigona spinipes} on the façade of the {IC-UNICAMP building}"

mov "${ptmp}" 2009-12-22-184716.jpg                   "${dmug}" "stolfi-21"     "on 2009-12-22 at 18:47:16 local time" "J.Stolfi" "an A4Tech PC-935 webcam"    1 "100%" "0"   "(S)"   "{Jorge Stolfi} in his office at IC-UNICAMP" 
mov "${temp}" 07-04-08_0611.jpg                       "${dmug}" "stolfi-23"     "on 2008-04-07 at 06:11 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "(HC)"  "{Jorge Stolfi} at ???" 

mov "./%s"  posseimecc050311.jpg                      "${misc}" "stolfi-22"     "on 2005-03-11"                        "???"       "an unknown camera"          1 "100%" "0"   "(S)"   "{Jorge Stolfi} in the IMECC-UNICAMP Auditorium, receiving the office of Director of IC-UNICAMP"

mov "${ptmp}" Trigona_spinipes_103.jpg                "${plan}" "flower-035"    "on 2008:04:17 at 14:11:15 local time" "J.Stolfi"  "a SONY DSC-V1 camera"       1 "50%" "0"   "(ZH)"   "{Unidentified flower}, somewhere in the state of São Paulo" 

mov "${temp}" 28-03-08_1424.jpg                       "${misc}" "celia-8"       "on 2008-03-28 at 14:24 local time"    "J.Stolfi"  "a Motorola Razr V306 phone" 1 "100%"  "-90" "(SC)" "{Celia Picinin de Mello} at IC-UNICAMP"

mov "${ptmp}" 2002-04-11-172838-sws-js-at-ic-uff.jpg  "${nada}" "sws-js-ah-1"   "on 2002:04:11 at 17:28:38 local time" "H.Leitão"  "Sony Mavica CD-300"        0 "100%" "0"   "()"    "siang, stolfi, haeusler" 
mov "${temp}" FT256129.JPG                            "${nada}" "arnaldo-7"     "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "arnaldo"  
mov "${temp}" FT225282.JPG                            "${nada}" "buzato-2"      "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "buzato"   
mov "${temp}" FT043559.JPG                            "${nada}" "cecilia-6"     "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "cecilia"  
mov "${temp}" FT037885.JPG                            "${nada}" "celio-4"       "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "celio"    
mov "${temp}" FT252816.JPG                            "${nada}" "cid-7"         "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "cid"     
mov "${temp}" FT122483.JPG                            "${nada}" "cmbm-8"        "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "cmbm"     
mov "${temp}" FT206369.JPG                            "${nada}" "capeleto-2"    "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "capeleto" 
mov "${temp}" FT114511.JPG                            "${nada}" "domingos-2"    "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "domingos" 
mov "${temp}" FT147141.JPG                            "${nada}" "ducatte-5"     "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "ducatte" 
mov "${temp}" FT248479.JPG                            "${nada}" "eliane-3"      "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "eliane" 
mov "${temp}" FT127264.JPG                            "${nada}" "euclydes-1"    "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "euclydes" 
mov "${temp}" FT177938.JPG                            "${nada}" "furlan-2"      "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "furlan" 
mov "${temp}" FT039977.JPG                            "${nada}" "hans-2"        "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "hans"     
mov "${temp}" FT148351.JPG                            "${nada}" "magali-3"      "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "magali" 
mov "${temp}" FT170241.JPG                            "${nada}" "mariajo-4"     "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "mariajo" 
mov "${temp}" FT141241.JPG                            "${nada}" "meidanis-6"    "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "meidanis" 
mov "${temp}" FT149390.JPG                            "${nada}" "mercedes-2"    "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "mercedes" 
mov "${temp}" FT238635.JPG                            "${nada}" "pannain-2"     "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "pannain" 
mov "${temp}" FT167029.JPG                            "${nada}" "ragazzi-12"    "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "ragazzi" 
mov "${temp}" FT207799.JPG                            "${nada}" "roseli-2"      "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "roseli" 
mov "${temp}" FT141275.JPG                            "${nada}" "setubal-2"     "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "setubal" 
mov "${temp}" FT046141.JPG                            "${nada}" "silvia-2"      "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "silvia" 
mov "${temp}" FT081159.JPG                            "${nada}" "sinval-2"      "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "sinval" 
mov "${temp}" FT177334.JPG                            "${nada}" "solange-2"     "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "solange" 
mov "${temp}" FT039233.JPG                            "${nada}" "vanini-1"      "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "vanini" 
mov "${temp}" FT248274.JPG                            "${nada}" "wainer-4"      "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "wainer" 
mov "${temp}" FT103268.JPG                            "${nada}" "paulo-2"       "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "paulo"     
mov "${temp}" FT058815.JPG                            "${nada}" "sidneygs-2"    "in 1997"                              "UNICAMP"   "an ID camera"              0 "100%" "0"   "()"    "sidneygs" 
mov "${temp}" zanoni-280x392.jpg                      "${dmug}" "zanoni-1"      "before 2005"                          "J.Stolfi"  "an unknown camera"         0 "100%" "0"   "()"    "zanoni"     
mov "${temp}" FT249181.JPG                            "${dmug}" "abode-2"       "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Ademir Bodê}'s ID picture"     
mov "${temp}" FT122360.JPG                            "${dmug}" "anamaria-6N"   "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Anamaria Gomide}'s ID picture" 
mov "${temp}" FT245461.JPG                            "${dmug}" "ariadne-14"    "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Ariadne Maria Brito Rizzoni Carvalho}'s ID picture" 
mov "${temp}" FT115614.JPG                            "${dmug}" "celia-7"       "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Celia Picinin de Mello}'s ID picture"     
mov "${temp}" FT075370.JPG                            "${dmug}" "edmundo-4"     "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Edmundo Roberto Mauro Madeira}'s ID picture"    
mov "${temp}" FT237159.JPG                            "${dmug}" "guido-3"       "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Guido Costa Souza de Araújo}'s ID picture"     
mov "${temp}" FT047643.JPG                            "${dmug}" "heloisa-2"     "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Heloísa Vieira da Rocha}'s ID picture"     
mov "${temp}" FT038075.JPG                            "${dmug}" "lucchesi-5"    "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Cláudio Leonardo Lucchesi}'s ID picture"     
mov "${temp}" FT248355.JPG                            "${dmug}" "neucimar-4"    "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Neucimar Jerônimo Leite}'s ID picture"     
mov "${temp}" FT254835.JPG                            "${dmug}" "nfonseca-2"    "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Nelson Luís Saldanha da Fonseca}'s ID picture"     
mov "${temp}" FT162906.JPG                            "${dmug}" "nivaldo-2"     "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Nivaldo da Silva}"     
mov "${temp}" FT066559.JPG                            "${dmug}" "ranido-8"      "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Ricardo de Oliveira Anido}'s ID picture"     
mov "${temp}" FT252719.JPG                            "${dmug}" "roland-2"      "in 1997"                              "UNICAMP"   "an ID camera"              1 "100%" "0"   "(S)"   "{Roland Scialom}'s ID picture"     
mov "${ptmp}" 2008-04-17-141135-flower.jpg            "${dtri}" "trigona-01"    "on 2008:04:17 at 14:11:35 local time" "J.Stolfi" "a SONY DSC-V1 camera"       1 "100%" "0"   "(ZSC)" "${nest}"
mov "${ptmp}" 2009-12-22-182859.jpg                   "${dmug}" "stolfi-18"     "on 2009-12-22 at 18:28:59 local time" "J.Stolfi" "an A4Tech PC-935 webcam"    1 "100%" "0"   "(S)"   "{Jorge Stolfi} in his office at IC-UNICAMP" 
mov "${ptmp}" 2009-12-22-182951.jpg                   "${dmug}" "stolfi-19"     "on 2009-12-22 at 18:29:51 local time" "J.Stolfi" "an A4Tech PC-935 webcam"    1 "100%" "0"   "(S)"   "{Jorge Stolfi} in his office at IC-UNICAMP" 
mov "${ptmp}" 2009-12-22-184306.jpg                   "${dmug}" "stolfi-20"     "on 2009-12-22 at 18:43:06 local time" "J.Stolfi" "an A4Tech PC-935 webcam"    1 "100%" "0"   "(S)"   "{Jorge Stolfi} in his office at IC-UNICAMP" 
mov "${temp}" 01-04-08_1126.jpg                       "${nada}" "ata-consu-1"   "on 2008-04-01 at 11:26:00 local time" "J.Stolfi" "a Motorola Razr V306 phone" 0 "100%" "-90" "(J)"   "Test image (a page from UNICAMP's Council proceedings)"
mov "${temp}" 19-03-08_1757.jpg                       "${nada}" "rfvs-hcgl-0"   "on 2008-03-19 at 17:57:00 local time" "J.Stolfi" "a Motorola Razr V306 phone" 0 "100%" "0"   "(J)"   "{Rafael Felipe Veiga Saracchini} and {Helena Cristina da Gama Leitão} in the {LIV} room at {IC-UNICAMP}"
mov "${ptmp}" 27-04-08_1638.jpg                       "${capa}" "gartiet-1"     "on 2008-04-27 at 16:38:00 local time" "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "()"    "Cover of {Tres Grotos em Férias no Rio Tietê} by {Francisco de Barros Júnior}"
mov "${ptmp}" 27-04-08_1639.jpg                       "${capa}" "gartiet-2"     "on 2008-04-27 at 16:39:00 local time" "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "0"   "()"    "Sample pages of {Tres Grotos em Férias no Rio Tietê} by {Francisco de Barros Júnior}"
mov "${ptmp}" 27-04-08_1646.jpg                       "${capa}" "pinocchio-2"   "on 2008-04-27 at 16:46:00 local time" "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "()"    "Frontispice of {As Aventuras de Pinocchio (história de um boneco)} by {Carlo Collodi}, translated by {Guilherme de Almeida}" 
mov "${ptmp}" 27-04-08_1647.jpg                       "${capa}" "pinocchio-1"   "on 2008-04-27 at 16:47:00 local time" "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "0"   "()"    "Detail of cover of {As Aventuras de Pinocchio (história de um boneco)} by {Carlo Collodi}, translated by {Guilherme de Almeida}" 
mov "${ptmp}" Trigona_spinipes_095.jpg                "${dtri}" "trigona-02"    "on 2008:04:17 at 14:07:03 local time" "J.Stolfi" "a SONY DSC-V1 camera"       1 "25%"  "-90" "(ZQ)"  "${nest}" 
mov "${ptmp}" Trigona_spinipes_096.jpg                "${dtri}" "trigona-03"    "on 2008:04:17 at 14:07:09 local time" "J.Stolfi" "a SONY DSC-V1 camera"       1 "50%"  "-90" "(ZH)"  "${nest}" 
mov "${ptmp}" Trigona_spinipes_097.jpg                "${dtri}" "trigona-04"    "on 2008:04:17 at 14:07:26 local time" "J.Stolfi" "a SONY DSC-V1 camera"       1 "50%"  "-90" "(ZQ)"  "${nest}" 
mov "${ptmp}" Trigona_spinipes_098.jpg                "${dtri}" "trigona-05"    "on 2008:04:17 at 14:07:35 local time" "J.Stolfi" "a SONY DSC-V1 camera"       1 "50%"  "-90" "(ZS)"  "${nest}" 
mov "${ptmp}" Trigona_spinipes_099.jpg                "${dtri}" "trigona-06"    "on 2008:04:17 at 14:07:48 local time" "J.Stolfi" "a SONY DSC-V1 camera"       1 "50%"  "-90" "(ZS)"  "${nest}" 
mov "${ptmp}" Trigona_spinipes_100.jpg                "${dtri}" "trigona-07"    "on 2008:04:17 at 14:09:46 local time" "J.Stolfi" "a SONY DSC-V1 camera"       1 "50%"  "-90" "(ZS)"  "${nest}" 
mov "${ptmp}" Trigona_spinipes_101.jpg                "${dtri}" "trigona-08"    "on 2008:04:17 at 14:09:53 local time" "J.Stolfi" "a SONY DSC-V1 camera"       0 "25%"  "-90" "(ZU)"  "${nest}" 
mov "${ptmp}" Trigona_spinipes_102.jpg                "${dtri}" "trigona-09"    "on 2008:04:17 at 14:10:04 local time" "J.Stolfi" "a SONY DSC-V1 camera"       1 "50%"  "-90" "(ZS)"  "${nest}" 
mov "${ptmp}" man-help-nat-1.png                      "${plan}" "tree-003"      "on 2005:01:14 at 17:58:27 local time" "J.Stolfi" "a Canon PowerShot Pro1"     1 "50%"  "0"   "(HC)"  "An egregious example of {Man helping Nature} in Avenida Albert Einstein, {UNICAMP}" 
mov "${ptmp}" rtorres-2.png                           "${dmug}" "rtorres-4"     "on 2005:01:14 at 13:58:56 local time" "J.Stolfi" "a Canon PowerShot Pro1"     1 "50%"  "0"   "(HC)"  "{Ricardo da Silva Torres} at IC-UNICAMP" 
mov "${temp}" 01-04-08_0828.jpg                       "${dtri}" "trigona-10"    "on 2008-04-01 at 08:28 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "(SC)"  "${nest}" 
mov "${temp}" 01-04-08_0829.jpg                       "${dtri}" "trigona-12"    "on 2008-04-01 at 08:29 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "(SC)"  "${nest}" 
mov "${temp}" 01-04-08_0830.jpg                       "${dtri}" "trigona-13"    "on 2008-04-01 at 08:30 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "(SC)"  "${nest}" 
mov "${temp}" 01-04-08_0831.jpg                       "${dtri}" "trigona-14"    "on 2008-04-01 at 08:31 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "(SC)"  "${nest}" 
mov "${temp}" 01-04-08_0832.jpg                       "${dtri}" "trigona-15"    "on 2008-04-01 at 08:32 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "(SC)"  "${nest}" 
mov "${temp}" 01-04-08_0833.jpg                       "${dtri}" "trigona-16"    "on 2008-04-01 at 08:33 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "(SC)"  "${nest}" 

mov "${temp}" 07-04-08_1541.jpg                       "${even}" "2008-04-msc-abreu/01"            "on 2008-04-07 at 15:41 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "(SC)"  "{Maurício Kischinhevsky} and {Luis André Gomes de Abreu} after the latter's M.Sc. orals at the {Federal Fluminense University}" 
mov "${temp}" 07-04-08_2011.jpg                       "${misc}" "hcgl-22"       "on 2008-04-07 at 20:11 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "-90" "(SC)"  "{Helena Cristina da Gama Leitão} at the {Palheta} snack bar in the {Galeão Airport}, {Rio de Janeiro}" 
mov "${temp}" 19-03-08_1756.jpg                       "${misc}" "rfvs-hscgl-1"  "on 2008-03-19 at 17:56 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "0"   "(SC)"  "{Rafael Felipe Veiga Saracchini} and {Helena Cristina da Gama Leitão} in the {Laboratory for Visual Informatics} at IC-UNICAMP" 
mov "${temp}" 20-03-08_1638.jpg                       "${land}" "ic-bldg-1"     "on 2008-03-20 at 16:38 local time"    "J.Stolfi" "a Motorola Razr V306 phone" 1 "100%" "0"   "(SC)"  "Façade of the {IC-UNICAMP building}"

# DONE:

${cvt[@]} -crop   50  72  380  532 -size  380  532 photos/figures/covers/gartiet-1/orig.png
${cvt[@]} -crop   38  15  532  380 -size  532  380 photos/figures/covers/gartiet-2/orig.png
${cvt[@]} -crop  140  60  490  350 -size  490  350 photos/figures/covers/pinocchio-1/orig.png
${cvt[@]} -crop   62  62  380  532 -size  380  532 photos/figures/covers/pinocchio-2/orig.png

${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/abode-2/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/anamaria-6N/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/ariadne-14/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/celia-7/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/edmundo-4/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/guido-3/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/heloisa-2/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/lucchesi-5/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/neucimar-4/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/nfonseca-2/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/nivaldo-2/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/ranido-8/orig.png
${cvt[@]} -crop    7   2  225  315 -size  225  315 photos/people/roland-2/orig.png

${cvt[@]} -crop    0   0  397  555 -size  397  555 photos/people/rtorres-4/orig.png

${cvt[@]} -crop  190   0  340  476 -size  340  476 photos/people/stolfi-18/orig.png
${cvt[@]} -crop  190   0  340  476 -size  340  476 photos/people/stolfi-19/orig.png
${cvt[@]} -crop  150   0  340  476 -size  340  476 photos/people/stolfi-20/orig.png
${cvt[@]} -crop  155   0  340  476 -size  340  476 photos/people/stolfi-21/orig.png
${cvt[@]} -crop    0   0  300  220 -size  300  220 photos/misc/stolfi-22/orig.png
${cvt[@]} -crop 1100 400  900 1200 -size  900 1200 photos/animals/trigona-01/orig.png
${cvt[@]} -crop    0   0  240  320 -size  240  320 photos/animals/trigona-02/orig.png
${cvt[@]} -crop    0   0  480  640 -size  480  640 photos/animals/trigona-03/orig.png
${cvt[@]} -crop    0   0  480  640 -size  480  640 photos/animals/trigona-04/orig.png
${cvt[@]} -crop    0   0  480  640 -size  480  640 photos/animals/trigona-05/orig.png
${cvt[@]} -crop    0   0  480  640 -size  480  640 photos/animals/trigona-06/orig.png
${cvt[@]} -crop  250 250  480  640 -size  480  640 photos/animals/trigona-07/orig.png
${cvt[@]} -crop  280 220  480  640 -size  480  640 photos/animals/trigona-09/orig.png
${cvt[@]} -crop    0   0  480  640 -size  480  640 photos/events/2008-04-msc-abreu/01/orig.png
${cvt[@]} -crop    0 150  350  490 -size  350  500 photos/misc/celia-8/orig.png
${cvt[@]} -crop    0   0  480  640 -size  480  640 photos/misc/hcgl-22/orig.png
${cvt[@]} -crop    0   0  640  480 -size  640  480 photos/misc/rfvs-hscgl-1/orig.png
${cvt[@]} -crop   40  40  425  595 -size  425  595 photos/people/stolfi-23/orig.png

${cvt[@]} -crop    0 472  700  500 -size  700  500 photos/plants/flower-035/orig.png
${cvt[@]} -crop    6  40  560  400 -size  560  400 photos/plants/tree-003/orig.png

# JUNKED: 

# ${cvt[@]} -crop    0   0  120  160 -size  120  160 photos/animals/trigona-10/orig.png
# ${cvt[@]} -crop    0   0  120  160 -size  120  160 photos/animals/trigona-12/orig.png
# ${cvt[@]} -crop    0   0  120  160 -size  120  160 photos/animals/trigona-13/orig.png
# ${cvt[@]} -crop    0   0  120  160 -size  120  160 photos/animals/trigona-14/orig.png
# ${cvt[@]} -crop    0   0  120  160 -size  120  160 photos/animals/trigona-15/orig.png
# ${cvt[@]} -crop    0   0  120  160 -size  120  160 photos/animals/trigona-16/orig.png