Netpbm Official Docs

Image Type Descriptions

Black and white image format
Grayscale image format
RGB image format
Any file of the above formats
Generic two-dimensional grid format

Formats are downwards compatible. For example, any ppm program can deal with pbm image, etc. Pam is downward compatible with any format.

Create thumbnails of a folder of images sized at 50%

ls *.jpg | while read item; do jpegtopnm "$item" | pamscale .50 | pnmtojpeg > `echo file | sed 's|\(.*\)\.jpg|\1-thumb.jpg|'`

Add Drop Shawdow to an Image

jpegtopnm file | pnmmargin -white 10 | ppmshadow | pnmtojpeg > file.done; mv file.done file

Label Images

jpegtopnm file | ppmlabel -text 'hi there!' | pnmtojpeg > `echo file | sed 's|\(.*\)\.jpg|\1-label.jpg|'`

Glue Images Together


   images/totakeke1.gif converted to ascii text with netpbm 
                  Mo                                        ooo
                  MM  oMo                                   "MMM
                 MMMoMMMM                                     MMMo
                oMMM"MMMM                                      "MMM
               MMM"   MMMooooooo                                 MMMo
                 "    MMMMMMMMMMMo                   oMMMMoo
                      MMMMMMMMMMMMo                oMMMMMMMMM
                      MMMMMMMMMMMMMMo             MMMMMMMM""
                      MMMMMMMMMMMMMMMo            MMMM"" oMMo
                      MMMMMMMMMMMMMMMMo          MM""  oMMM"M"
                       MMMMMMMMMMMMMM           M" oMMMMMMM
                        MMMMMMMMMMMMM             M"""MMMMM
                        "MMMMMMMMMM                  "MMMM "
                      o     "MMMMMMMM
                    M"        MMMMMMMM  MMMMMoo
                    M         MMMMMMMMMMMMMMMMMMo
                    "         MMMMMMMMMMMMMMMMMMM      o
                      Mo      MMMMMMMMMMMMMMMMMM    oooM
                      "MM  ooM"MMMMMMMMMMMMMMoooooMMM"             MMM  M
                       "MMMMMM    """MMMMMMMMMMMM""               o"  MM
                          ""MM       MMMMMMMMMMMMoooo  o  oooooM MMoo MMM
                            MM     MMMMMMo  oMoMMoMo   M  MMMMMMMoMMooMM"
                            MM oooo"MMMM"  """""""MMo             ""  M
                            Mo MMMMo  "           MMM
                               MMMMMMMMM            MMM
                  o             "MMM"""       o      MMM
                  "                          "        ""
                   "            oMoMo
                     ooo      oMMMMMMMMo"
                                  """""o oM
                                       " ""