home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume42 / icontact / part01 next >
Encoding:
Internet Message Format  |  1994-05-17  |  45.2 KB

  1. From: mark%eggman.uucp@nosc.mil (Mark Hanson)
  2. Newsgroups: comp.sources.misc
  3. Subject: v42i097:  icontact - perl script to create contact sheets of images, v1.4, Part01/02
  4. Date: 17 May 1994 12:14:46 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <csm-v42i097=icontact.121424@sparky.sterling.com>
  9. X-Md4-Signature: 1c6f85dfbbe85be1586b763a7df5bc1d
  10.  
  11. Submitted-by: mark%eggman.uucp@nosc.mil (Mark Hanson)
  12. Posting-number: Volume 42, Issue 97
  13. Archive-name: icontact/part01
  14. Environment: UNIX, perl, pbmplus
  15. Supersedes: icontact: Volume 33, Issue 30-31
  16.  
  17. README file for icontact-1.4 (13MAY94)
  18.  
  19. This is the fifth release of icontact.
  20.  
  21. New features include (look at the man page for the specifics):
  22.     - optional right justification of the rows. (-R)
  23.     - fixed a bug which made the -n option inoperable.
  24.     - .gz extension commands for gzip and gunzip programs.
  25.     - now informational messages go to stdout and
  26.       warnings and errors go to stderr.
  27.     - new signal name generator (no more static tables).
  28.     - .ps (PostScript file) processing command using Ghostscript.
  29.     - additional label showing the image's original size. (-m)
  30.     - added hpcdtoppm extension processing command (not tested because
  31.       I don't have any Photo CD's).
  32.     - option to prevent scaling of images. (-Z)
  33.     - simple xvtoppm filter to convert xv's "Visual Schnauzer" files
  34.       into ppm.
  35.     - option to scale all the images by the same amount. (-M)
  36.     - case insensitive uniq of file names. (-U)
  37.     - the usual miscellaneous fixes and cleanup.
  38.  
  39. This release does not contain all the features that have been requested
  40. because of time constraints.  Here are some of the suggestions I've
  41. received that I'll be trying to work on in the future:
  42.  
  43.     * decode command to build contact sheets of multi-page PS files
  44.     * decode command to build contact sheets of the frames of MPEG movies
  45.     * have a _list_ of multiple formats to try if a file has no known suffix
  46.     * commands to execute when the decoding fails for a file
  47.     * parallel execution, for use with multiple CPU's or many machines on a net
  48.     * header and footer titles, with %-style escape sequences
  49.     * top, bottom or center justification of images (bottom being default)
  50.     * user defined sorting method for file names
  51.     * there might be a bug that causes temporary files to not be removed
  52.     * meta options, like psfilt
  53.     * upgrade to perl 5 and a newer version of pbmplus if one is released
  54.  
  55. To get started using icontact, follow the instructions in the file
  56. named INSTALL.
  57.  
  58. Here is the DESCRIPTION section from the man page:
  59.  
  60.     icontact is a perl script that takes a bunch of image files and
  61.     creates contact sheets.  icontact determines the file  format by the
  62.     file name extension of the input files and then uses internal tables
  63.     to look up the commands it needs to execute in order to convert the
  64.     images to the ppm format.  Once in the ppm  format, icontact  uses
  65.     various pbmplus commands to create the contact sheets.  icontact is
  66.     particularly useful if you have lots of image files in all sorts of
  67.     different formats and you want to create an index of all of them
  68.     without converting them all to a common format first.
  69.  
  70.     icontact is highly configurable.   It can probably do anything you
  71.     would ever want this type of program to do -- and more.
  72.  
  73.     Besides perl, icontact requires the pbmplus package by Jef
  74.     Poskanzer.  The Independent JPEG Group's  package  (cjpeg, djpeg) is
  75.     also necessary if you are going to be processing any JPEG files.
  76.     Ghostscript can be used to turn PostScript files into ppm files for
  77.     inclusion in a contact sheet.  It should not be difficult to make
  78.     icontact use filters from other packages as long as there is a way to
  79.     go to and from the ppm format with them.
  80.  
  81. Copyright status:
  82.   Copyright (C) 1992, 1993, 1994  Mark B. Hanson
  83.     Permission to use, copy, modify, and distribute this software and its
  84.     documentation for any purpose and without fee is hereby granted,
  85.     provided that both the above copyright notice and this permission
  86.     notice appear in all copies and in supporting documentation.  This
  87.     software is provided ``as is'' without express or implied warranty.
  88.  
  89. I would appreciate hearing from you if you find icontact useful or have
  90. suggestions on how to make it better.  icontact has only been tested on
  91. a Sun SPARCstation running SunOS 4.1.2, perl 4.036, and the 10dec91
  92. release of the pbmplus toolkit.  If icontact fails in your environment
  93. in some funny way, and you're running older versions of the supporting
  94. software, my first suggestion is going to be to upgrade your software.
  95. Most of the problems I've been contacted about have resulted from old
  96. versions of the supporting software.  Otherwise, let me know so I can
  97. fix it.
  98.  
  99. Please send all e-mail regarding icontact to mark%eggman.uucp@nosc.mil
  100. (note the new address).  Thanks.
  101.  
  102. I hope you find icontact useful,
  103. Mark
  104.  
  105. ---
  106.  
  107. #! /bin/sh
  108. # This is a shell archive.  Remove anything before this line, then unpack
  109. # it by saving it into a file and typing "sh file".  To overwrite existing
  110. # files, type "sh file -c".  You can also feed this as standard input via
  111. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  112. # will see the following message at the end:
  113. #        "End of archive 1 (of 2)."
  114. # Contents:  icontact-1.4 icontact-1.4/INSTALL icontact-1.4/Makefile
  115. #   icontact-1.4/README icontact-1.4/THANKS icontact-1.4/icontact.1
  116. #   icontact-1.4/xvtoppm.1 icontact-1.4/xvtoppm.c
  117. # Wrapped by mark@eggman on Fri May 13 20:43:20 1994
  118. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  119. if test ! -d 'icontact-1.4' ; then
  120.     echo shar: Creating directory \"'icontact-1.4'\"
  121.     mkdir 'icontact-1.4'
  122. fi
  123. if test -f 'icontact-1.4/INSTALL' -a "${1}" != "-c" ; then 
  124.   echo shar: Will not clobber existing file \"'icontact-1.4/INSTALL'\"
  125. else
  126. echo shar: Extracting \"'icontact-1.4/INSTALL'\" \(1880 characters\)
  127. sed "s/^X//" >'icontact-1.4/INSTALL' <<'END_OF_FILE'
  128. X@(#)$Id: INSTALL,v 1.11 1994/03/05 06:28:24 mark Exp $
  129. X
  130. XCopyright (C) 1992, 1993, 1994  Mark B. Hanson
  131. X  Permission to use, copy, modify, and distribute this software and its
  132. X  documentation for any purpose and without fee is hereby granted,
  133. X  provided that both the above copyright notice and this permission
  134. X  notice appear in all copies and in supporting documentation.  This
  135. X  software is provided "as is" without express or implied warranty.
  136. X
  137. XInstallation instructions for icontact:
  138. X---------------------------------------
  139. X
  140. XTo install icontact, follow these instructions:
  141. X
  142. X  0. Make sure that you have perl and the pbmplus packages
  143. X     installed and in your path.  I recommend perl-4.036 and
  144. X     pbmplus-10dec91, as that's what I'm using.
  145. X
  146. X  1. Change the first line of the icontact script to invoke perl as
  147. X     it is installed on your system.
  148. X
  149. X  2. Make sure that someone has run h2ph on signal.h on your machine.
  150. X     icontact requires signal.ph.  In the event you can't get signal.ph
  151. X     installed, look at the icontact script, comment out the signal handling
  152. X     code marked `the fancy way' and uncomment the code marked
  153. X     `the not-so-fancy way'.
  154. X
  155. X  3. The xvtoppm filter can be built just by typing `make' (granted that
  156. X     you have a compiler/development software on your machine).
  157. X
  158. X  4. `make install' will install everything for you.  By default, the
  159. X     Makefile is set up to install the stuff in /usr/local/{bin,man/man1}.
  160. X     You can change this by editing the first few lines of the Makefile.
  161. X
  162. X  5. Read the man pages.
  163. X
  164. X  6. You're done.  Enjoy.
  165. X
  166. X  7. If you like icontact and/or use it often, let me know about it;
  167. X     it's incentive for me to update it and write other nifty things.
  168. X     If you have trouble installing or running icontact, send a good
  169. X     description of your problem to me at mark%eggman.uucp@nosc.mil.
  170. X     I may be able to help.
  171. END_OF_FILE
  172. if test 1880 -ne `wc -c <'icontact-1.4/INSTALL'`; then
  173.     echo shar: \"'icontact-1.4/INSTALL'\" unpacked with wrong size!
  174. fi
  175. # end of 'icontact-1.4/INSTALL'
  176. fi
  177. if test -f 'icontact-1.4/Makefile' -a "${1}" != "-c" ; then 
  178.   echo shar: Will not clobber existing file \"'icontact-1.4/Makefile'\"
  179. else
  180. echo shar: Extracting \"'icontact-1.4/Makefile'\" \(1748 characters\)
  181. sed "s/^X//" >'icontact-1.4/Makefile' <<'END_OF_FILE'
  182. X# @(#)$Id: Makefile,v 1.10 1994/05/14 03:42:57 mark Exp $
  183. X
  184. X# Copyright (C) 1992, 1993, 1994  Mark B. Hanson
  185. X#   Permission to use, copy, modify, and distribute this software and its
  186. X#   documentation for any purpose and without fee is hereby granted,
  187. X#   provided that both the above copyright notice and this permission
  188. X#   notice appear in all copies and in supporting documentation.  This
  189. X#   software is provided "as is" without express or implied warranty.
  190. X
  191. XBIN=/usr/local/bin
  192. XMAN=/usr/local/man/man1
  193. XMANEXT=1
  194. X
  195. XCC=cc
  196. XCFLAGS=-O
  197. X
  198. Xall: icontact xvtoppm
  199. X
  200. Xicontact: force
  201. X    chmod +x icontact
  202. X
  203. Xxvtoppm: xvtoppm.c
  204. X    $(RM) xvtoppm
  205. X    $(CC) $(CFLAGS) xvtoppm.c -o xvtoppm
  206. X
  207. Xinstall: all
  208. X    cp icontact $(BIN)
  209. X    cp xvtoppm $(BIN)
  210. X    cp icontact.1 $(MAN)/icontact.$(MANEXT)
  211. X    chmod 444 $(MAN)/icontact.$(MANEXT)
  212. X    cp xvtoppm.1 $(MAN)/xvtoppm.$(MANEXT)
  213. X    chmod 444 $(MAN)/xvtoppm.$(MANEXT)
  214. X
  215. X#
  216. X# Author's use only...
  217. X#
  218. XVERSION=1.4
  219. Xkit: clean
  220. X    mkdir icontact-$(VERSION)
  221. X    chmod 0755 icontact-$(VERSION)
  222. X    cp README INSTALL THANKS Makefile icontact icontact.1 xvtoppm.c \
  223. X        xvtoppm.1 icontact-$(VERSION)
  224. X    chmod 0444 icontact-$(VERSION)/INSTALL
  225. X    chmod 0444 icontact-$(VERSION)/Makefile
  226. X    chmod 0444 icontact-$(VERSION)/README
  227. X    chmod 0444 icontact-$(VERSION)/THANKS
  228. X    chmod 0755 icontact-$(VERSION)/icontact
  229. X    chmod 0444 icontact-$(VERSION)/icontact.1
  230. X    chmod 0644 icontact-$(VERSION)/xvtoppm.c
  231. X    chmod 0444 icontact-$(VERSION)/xvtoppm.1
  232. X    makekit icontact-$(VERSION) icontact-$(VERSION)/*
  233. X    (cat HEADER; \
  234. X     echo; \
  235. X     cat README; \
  236. X     echo; \
  237. X     echo "---"; \
  238. X     echo; \
  239. X     cat Part01) > tmp; mv tmp Part01
  240. X    (cat HEADER; \
  241. X     echo; \
  242. X     echo "---"; \
  243. X     echo; \
  244. X     cat Part02) > tmp; mv tmp Part02
  245. X    $(RM) -r icontact-$(VERSION)
  246. X
  247. Xclean: force
  248. X    $(RM) xvtoppm xvtoppm.o
  249. X    $(RM) Part??
  250. X
  251. Xforce:
  252. END_OF_FILE
  253. if test 1748 -ne `wc -c <'icontact-1.4/Makefile'`; then
  254.     echo shar: \"'icontact-1.4/Makefile'\" unpacked with wrong size!
  255. fi
  256. # end of 'icontact-1.4/Makefile'
  257. fi
  258. if test -f 'icontact-1.4/README' -a "${1}" != "-c" ; then 
  259.   echo shar: Will not clobber existing file \"'icontact-1.4/README'\"
  260. else
  261. echo shar: Extracting \"'icontact-1.4/README'\" \(4467 characters\)
  262. sed "s/^X//" >'icontact-1.4/README' <<'END_OF_FILE'
  263. X@(#)$Id: README,v 1.19 1994/05/14 03:42:58 mark Exp $
  264. X
  265. XREADME file for icontact-1.4 (13MAY94)
  266. X
  267. XThis is the fifth release of icontact.
  268. X
  269. XNew features include (look at the man page for the specifics):
  270. X    - optional right justification of the rows. (-R)
  271. X    - fixed a bug which made the -n option inoperable.
  272. X    - .gz extension commands for gzip and gunzip programs.
  273. X    - now informational messages go to stdout and
  274. X      warnings and errors go to stderr.
  275. X    - new signal name generator (no more static tables).
  276. X    - .ps (PostScript file) processing command using Ghostscript.
  277. X    - additional label showing the image's original size. (-m)
  278. X    - added hpcdtoppm extension processing command (not tested because
  279. X      I don't have any Photo CD's).
  280. X    - option to prevent scaling of images. (-Z)
  281. X    - simple xvtoppm filter to convert xv's "Visual Schnauzer" files
  282. X      into ppm.
  283. X    - option to scale all the images by the same amount. (-M)
  284. X    - case insensitive uniq of file names. (-U)
  285. X    - the usual miscellaneous fixes and cleanup.
  286. X
  287. XThis release does not contain all the features that have been requested
  288. Xbecause of time constraints.  Here are some of the suggestions I've
  289. Xreceived that I'll be trying to work on in the future:
  290. X
  291. X    * decode command to build contact sheets of multi-page PS files
  292. X    * decode command to build contact sheets of the frames of MPEG movies
  293. X    * have a _list_ of multiple formats to try if a file has no known suffix
  294. X    * commands to execute when the decoding fails for a file
  295. X    * parallel execution, for use with multiple CPU's or many machines on a net
  296. X    * header and footer titles, with %-style escape sequences
  297. X    * top, bottom or center justification of images (bottom being default)
  298. X    * user defined sorting method for file names
  299. X    * there might be a bug that causes temporary files to not be removed
  300. X    * meta options, like psfilt
  301. X    * upgrade to perl 5 and a newer version of pbmplus if one is released
  302. X
  303. XTo get started using icontact, follow the instructions in the file
  304. Xnamed INSTALL.
  305. X
  306. XHere is the DESCRIPTION section from the man page:
  307. X
  308. X    icontact is a perl script that takes a bunch of image files and
  309. X    creates contact sheets.  icontact determines the file  format by the
  310. X    file name extension of the input files and then uses internal tables
  311. X    to look up the commands it needs to execute in order to convert the
  312. X    images to the ppm format.  Once in the ppm  format, icontact  uses
  313. X    various pbmplus commands to create the contact sheets.  icontact is
  314. X    particularly useful if you have lots of image files in all sorts of
  315. X    different formats and you want to create an index of all of them
  316. X    without converting them all to a common format first.
  317. X
  318. X    icontact is highly configurable.   It can probably do anything you
  319. X    would ever want this type of program to do -- and more.
  320. X
  321. X    Besides perl, icontact requires the pbmplus package by Jef
  322. X    Poskanzer.  The Independent JPEG Group's  package  (cjpeg, djpeg) is
  323. X    also necessary if you are going to be processing any JPEG files.
  324. X    Ghostscript can be used to turn PostScript files into ppm files for
  325. X    inclusion in a contact sheet.  It should not be difficult to make
  326. X    icontact use filters from other packages as long as there is a way to
  327. X    go to and from the ppm format with them.
  328. X
  329. XCopyright status:
  330. X  Copyright (C) 1992, 1993, 1994  Mark B. Hanson
  331. X    Permission to use, copy, modify, and distribute this software and its
  332. X    documentation for any purpose and without fee is hereby granted,
  333. X    provided that both the above copyright notice and this permission
  334. X    notice appear in all copies and in supporting documentation.  This
  335. X    software is provided ``as is'' without express or implied warranty.
  336. X
  337. XI would appreciate hearing from you if you find icontact useful or have
  338. Xsuggestions on how to make it better.  icontact has only been tested on
  339. Xa Sun SPARCstation running SunOS 4.1.2, perl 4.036, and the 10dec91
  340. Xrelease of the pbmplus toolkit.  If icontact fails in your environment
  341. Xin some funny way, and you're running older versions of the supporting
  342. Xsoftware, my first suggestion is going to be to upgrade your software.
  343. XMost of the problems I've been contacted about have resulted from old
  344. Xversions of the supporting software.  Otherwise, let me know so I can
  345. Xfix it.
  346. X
  347. XPlease send all e-mail regarding icontact to mark%eggman.uucp@nosc.mil
  348. X(note the new address).  Thanks.
  349. X
  350. XI hope you find icontact useful,
  351. XMark
  352. END_OF_FILE
  353. if test 4467 -ne `wc -c <'icontact-1.4/README'`; then
  354.     echo shar: \"'icontact-1.4/README'\" unpacked with wrong size!
  355. fi
  356. # end of 'icontact-1.4/README'
  357. fi
  358. if test -f 'icontact-1.4/THANKS' -a "${1}" != "-c" ; then 
  359.   echo shar: Will not clobber existing file \"'icontact-1.4/THANKS'\"
  360. else
  361. echo shar: Extracting \"'icontact-1.4/THANKS'\" \(1696 characters\)
  362. sed "s/^X//" >'icontact-1.4/THANKS' <<'END_OF_FILE'
  363. X@(#)$Id: THANKS,v 1.8 1994/03/02 06:52:51 mark Exp $
  364. X
  365. X# Copyright (C) 1992, 1993, 1994  Mark B. Hanson
  366. X#   Permission to use, copy, modify, and distribute this software and its
  367. X#   documentation for any purpose and without fee is hereby granted,
  368. X#   provided that both the above copyright notice and this permission
  369. X#   notice appear in all copies and in supporting documentation.  This
  370. X#   software is provided "as is" without express or implied warranty.
  371. X
  372. XThanks to:
  373. X----------
  374. X+ Larry Wall (lwall@netlabs.com)
  375. X  for perl.
  376. X+ Jef Poskanzer (jef@well.sf.ca.us)
  377. X  for the pbmplus package.
  378. X+ Thomas Lane and the Independent JPEG Group
  379. X  for {c,d}jpeg
  380. X+ Roger Hayes (roger.hayes@eng.sun.com)
  381. X  for sending me an implementation of the -W option.
  382. X+ Larry W. Virden (lwv26@cas.org) 
  383. X  for suggesting the -O option and the feature that allows you to take an
  384. X  old contact sheet and add new images to it.
  385. X+ Marco Pauck (pauck@mcshh.hanse.de)
  386. X  for pointing out that I was using some possibly uninitialized variables.
  387. X+ Mark Valentine (mark@spider.co.uk)
  388. X  for suggesting the -L option and all the color options.
  389. X+ Shawn Koppenhoefer (shawn@litsun.epfl.ch),
  390. X  Scott Larsen (larsen@oes.orst.edu),
  391. X  G.D.Pratt (gerry@seq1.cc.keele.ac.uk), and
  392. X  Steve Messinger (stevem@hpdml90.boi.hp.com)
  393. X  for finding my missing semicolon.
  394. X+ Paul Close (pdc@sgi.com)
  395. X  for reporting that the -n option was broken and a bunch of suggestions.
  396. X+ Scott Larsen (cascorp!slarsen@pail.rain.com)
  397. X  for reporting that the -n option was broken.
  398. X+ Jon A. Tankersley (tank@amoco.com)
  399. X  for the idea for the Ghostscript decode command and a bunch of suggestions.
  400. X+ Jonathan Harris (jhar@dcs.ed.ac.uk)
  401. X  for the idea for the -m option.
  402. END_OF_FILE
  403. if test 1696 -ne `wc -c <'icontact-1.4/THANKS'`; then
  404.     echo shar: \"'icontact-1.4/THANKS'\" unpacked with wrong size!
  405. fi
  406. # end of 'icontact-1.4/THANKS'
  407. fi
  408. if test -f 'icontact-1.4/icontact.1' -a "${1}" != "-c" ; then 
  409.   echo shar: Will not clobber existing file \"'icontact-1.4/icontact.1'\"
  410. else
  411. echo shar: Extracting \"'icontact-1.4/icontact.1'\" \(22355 characters\)
  412. sed "s/^X//" >'icontact-1.4/icontact.1' <<'END_OF_FILE'
  413. X.\" @(#)$Id: icontact.1,v 1.18 1994/05/14 03:43:02 mark Exp $
  414. X.TH ICONTACT 1 "icontact\-1.4 (13MAY94)"
  415. X.\"
  416. X.SH NAME
  417. Xicontact - create contact sheets from images of different formats
  418. X.SH SYNOPSIS
  419. X\fBicontact\fP [ \fIswitches\fP ] [ { \fIimage file\fP | \fIparameter
  420. Xfile\fP } ... ]
  421. X.\"
  422. X.SH DESCRIPTION
  423. X.PP
  424. X\fIicontact\fP is a \fIperl\fP script that takes a bunch of image files
  425. Xand creates contact sheets.  \fIicontact\fP determines the file format
  426. Xby the file name extension of the input files and then uses internal
  427. Xtables to look up the commands it needs to execute in order to convert
  428. Xthe images to the ppm format.  Once in the ppm format, \fIicontact\fP
  429. Xuses various \fIpbmplus\fP commands to create the contact sheets.
  430. X\fIicontact\fP is particularly useful if you have lots of image files
  431. Xin all sorts of different formats and you want to create an index of
  432. Xall of them without converting them all to a common format first.
  433. X.PP
  434. X\fIicontact\fP is highly configurable.  It can probably do anything you
  435. Xwould ever want this type of program to do \(em and more.
  436. X.PP
  437. XBesides \fIperl\fP, \fIicontact\fP requires the \fIpbmplus\fP package
  438. Xby Jef Poskanzer.  The Independent JPEG Group's package (\fIcjpeg\fP,
  439. X\fIdjpeg\fP) is also necessary if you are going to be processing any
  440. XJPEG files.  Ghostscript can be used to turn PostScript files into ppm
  441. Xfiles for inclusion in a contact sheet.  It should not be difficult to
  442. Xmake \fIicontact\fP use filters from other packages as long as there is
  443. Xa way to go to and from the ppm format with them.
  444. X.SH OPTIONS
  445. X.PP
  446. XSwitches that do not take arguments may be combined into a single
  447. Xswitch: \fB\-abBlv\fP.  Switches that take arguments must be followed
  448. Xby their arguments with space in between:  \fB\-c\ 10\ \-r\ 5\fP.  The
  449. Xfancy way combine all these switches is:  \fB\-abBlvc\ 10\ \-r\ 5\fP.
  450. XThat is, you can combine the switches together in any way you like so
  451. Xlong as the switches that take an argument are followed by said
  452. Xargument with a space in between.  If you don't want to get fancy, just
  453. Xspecify each switch by itself:
  454. X\fB\-a\ \-b\ \-B\ \-c\ 10\ \-l\ \-r\ 5\ \-v\fP.
  455. X.\"
  456. X.PP
  457. XIn all cases in which a switch does not take an argument,
  458. X\fB\-switch\fP will turn the switch on, and \fB+switch\fP will turn the
  459. Xswitch off.  For example, \fB\-l\fP will turn labels on, and \fB+l\fP
  460. Xwill turn labels off.  This can be useful if you have a particular set
  461. Xof switches set in a configuration file and you want to temporarily
  462. Xdisable a switch to make a sheet without changing the configuration
  463. Xfile.  If a set of switches are combined into a single switch that
  464. Xleads with either a \fB+\fP or a \fB\-\fP, the \fB+\fP or \fB\-\fP
  465. Xaffects all the switches in that set of switches.  If a switch that
  466. Xtakes an argument is specified with a leading \fB+\fP, it is assumed
  467. Xthat you meant \fB\-\fP.
  468. X.\"
  469. X.PP
  470. XAn argument of \fB\-\-\fP terminates the options list and signals the
  471. Xbeginning of the file list.
  472. X.\"
  473. X.PP
  474. XSwitches can be specified in two places: the command line and a
  475. Xconfiguration file.  The command line switches are the most potent \(em
  476. Xthey override everything.  The switches in a configuration file are the
  477. Xnext most potent \(em they are only overridden by the command line
  478. Xswitches.  The internal defaults of \fIicontact\fP are overridden by
  479. Xboth the command line and configuration file.
  480. X.\"
  481. X.de o0
  482. X.IP \fB\(+-\\$1\fP
  483. X..
  484. X.de o1
  485. X.IP "\fB\-\\$1\fP \fI\\$2\fP"
  486. X..
  487. X.\"
  488. X.o0 a
  489. XMake the output sheets fit into the size specified with the \fB\-x\fP
  490. Xand \fB\-y\fP switches.  Setting the \fB\-x\fP and \fB\-y\fP switches
  491. Xto the size of your screen will yield contact sheets which are no
  492. Xlarger than your screen.  The \fB\-r\fP and \fB\-c\fP switches will be
  493. Xignored if the \fB\-a\fP switch is present because the number of rows
  494. Xand columns is figured out dynamically and will probably change from
  495. Xsheet to sheet unless the \fB\-i\fP switch is specified or all the
  496. Xsource images are of the same size to begin with.
  497. X.\"
  498. X.o0 B
  499. XAdd a border to each image in the contact sheet.  The colors of the
  500. Xborder stripes may be specified with the \fB\-z\fP switch.
  501. X.\"
  502. X.o0 b
  503. XUse the \fIbasename(1)\fP of the file name instead of the whole path
  504. Xname to the file in labels.  This switch will be ignored if the
  505. X\fB\-l\fP switch is not specified.
  506. X.\"
  507. X.o1 C color
  508. XUse \fIcolor\fP for the background of the contact sheet.  The default
  509. Xvalue is ``black''.
  510. X.\"
  511. X.o1 c n
  512. XMake the contact sheets with \fIn\fP columns of images.  This switch is
  513. Xignored if the \fB\-a\fP switch is specified.  The default value is 7.
  514. X.\"
  515. X.o1 D format
  516. XIf a file without a suffix is processed, assume it is a \fIformat\fP
  517. Xfile.  The default value is ``.gif''.
  518. X.\"
  519. X.o1 d dir
  520. XPut the contact sheets in \fIdir\fP when completed.  The default value
  521. Xis ``.''.
  522. X.\"
  523. X.o1 F file
  524. X\fIfile\fP will be used with \fIpbmtext\fP as a font for labels.  Each
  525. Ximage's height will be increased by the height of the characters in the
  526. Xfont.  This switch will be ignored if the \fB\-l\fP switch is not
  527. Xspecified.  By default, \fIpbmtext\fP's internal font is used.  Check out
  528. X\fIpbmtext\fP's man page for instructions on how to create a font file.
  529. X.\"
  530. X.o1 f format
  531. XEncode the finished contact sheets as \fIformat\fP files.  The default
  532. Xvalue is ``.ppm.Z''.
  533. X.\"
  534. X.o0 g
  535. XGenerate a parameter file for each contact sheet produced.  This
  536. Xparameter file will be named \fIprefix###\fP.\fIformat\fP.\fIsuffix\fP,
  537. Xwhere \fIprefix\fP is the contact sheet name, \fI###\fP is the number
  538. Xof the contact sheet, \fIformat\fP is the file format of the contact
  539. Xsheet, and \fIsuffix\fP is the parameter file suffix specified with the
  540. X\fB\-P\fP switch.  When \fIicontact\fP sees one of these files on the
  541. Xcommand line, it looks in the parameter file for the names and
  542. Xlocations of images inside the sheet specified by removing the
  543. X\fIsuffix\fP from the parameter file name.  These images will be cut
  544. Xout and put in the new output sheets instead of being fully processed
  545. Xagain.  For best results when using parameter files on the command
  546. Xline, select no quantization and a lossless file format both when the
  547. Xsheet is first created and also when its parameter file is used on the
  548. Xcommand line.  This will prevent information loss if this operation is
  549. Xperformed multiple times.
  550. X.\"
  551. X.o0 help
  552. XThis is a special case which will print out a help message explaining
  553. X\fIicontact\fP's switches.  Any other unrecognized switch will do the
  554. Xsame.
  555. X.\"
  556. X.o1 h n
  557. XMake each image in the contact sheets a maximum of \fIn\fP pixels
  558. Xhigh.  The aspect ratio of the images will not be changed.  This switch
  559. Xwill be ignored if the \fB\-X\fP switch is also specified.  The default
  560. Xvalue is 100.
  561. X.\"
  562. X.o1 I color
  563. XUse \fIcolor\fP for the area around the images when the \fB\-i\fP
  564. Xswitch is used.  This switch will be ignored if the \fB\-i\fP switch is
  565. Xnot also specified.  The default value is ``black''.
  566. X.\"
  567. X.o0 i
  568. XMake all of the images the same size.  The size of the images is
  569. Xdetermined by the dimensions specified with the \fB\-w\fP and \fB\-h\fP
  570. Xswitches.  If the shrunken image is smaller than the dimensions
  571. Xspecified with the \fB\-w\fP and \fB\-h\fP switches, the image will be
  572. Xpadded with blank space.  The color of this blank space can be set with
  573. Xthe \fB\-I\fP switch.  Use of this switch can create contact sheets
  574. Xwith lots of blank space between images.  This switch cannot be used
  575. Xwith the \fB\-X\fP or \fB\-Y\fP switches.
  576. X.\"
  577. X.o1 K file
  578. XUse \fIfile\fP as the configuration file.  The default configuration
  579. Xfile name is ``~/.icrc''.  Putting this switch in the configuration
  580. Xfile will have no effect since once you're in a configuration file,
  581. Xit's too late to switch to another one.
  582. X.\"
  583. X.o0 k
  584. XDon't reference the configuration file.  Putting this switch in the
  585. Xconfiguration file will have no effect since once you're in the
  586. Xconfiguration file, it's too late to back out.
  587. X.\"
  588. X.o0 L
  589. XWhen creating sheets, use left justification on the rows instead of the
  590. Xdefault center justification.  If this option is used in conjunction
  591. Xwith the \fB\-R\fP option, the options will negate each other.
  592. X.\"
  593. X.o0 l
  594. XAttach a label containing the image's file name below each image.  This
  595. Xname may be truncated if the label is wider than the image.  The
  596. Xbehavior of this switch can be changed with the \fB\-b\fP, \fB\-F\fP,
  597. Xand \fB\-T\fP switches.
  598. X.\"
  599. X.o1 M scale
  600. XScale all the input images to \fIscale\fP*100 percent of their original
  601. Xsize.  The value of \fIscale\fP may be in the range (0.0, infinity),
  602. Xalthough using values towards the upper end of that range will require a
  603. Xgreat deal of memory.  Values of \fIscale\fP greater than 1.0 will
  604. Xenlarge the input images (i.e., a \fIscale\fP of 2.0 will double the
  605. Xsize), and values less than 1.0 will shrink the input images (i.e., a
  606. X\fIscale\fP of 0.5 will halve the size).  This switch may not be used
  607. Xwith the \fB-i\fP, \fB-X\fP, \fB-Y\fP, or \fB-Z\fP switches for
  608. Xsemi-obvious reasons.  The default is not to scale images in this way.
  609. X.\"
  610. X.o0 m
  611. XAttach a label containing the image's size in pixels
  612. X(\fIwidth\fPx\fIheight\fP) below each image.  If the \fB\-l\fP switch
  613. Xis also specified, this label will go under the label containing the
  614. Xfile name.  This label may be truncated if the label is wider than the
  615. Ximage.  The behavior of this switch can be changed with the \fB\-F\fP
  616. Xand \fB\-T\fP switches.
  617. X.\"
  618. X.o1 N value
  619. XUse \fIvalue\fP as the nice value for all child processes.  The default
  620. Xvalue is 0.  Only root may specify negative nice values.
  621. X.\"
  622. X.o1 n file
  623. XTake the file names from \fIfile\fP and add them to the ones specified
  624. Xon the command line, if any.  The file names in \fIfile\fP must be one
  625. Xper line.  These file names will be processed after the file names
  626. Xspecified on the command line.
  627. X.\"
  628. X.o0 O
  629. XFind the number for the first sheet by looking in the destination
  630. Xdirectory for sheets with the same prefix and format that we are going
  631. Xto create.  Take the highest numbered one, increment, and this is the
  632. Xnew starting number for the new sheets.  If there are no files with the
  633. Xsame prefix and format in the destination directory, the new sheets
  634. Xwill start with 001.  This switch cannot be used with the \fB\-o\fP
  635. Xswitch.
  636. X.\"
  637. X.o1 o n
  638. XThe output sheet numbering will begin with \fIn\fP and increase from
  639. Xthere.  This switch cannot be used with the \fB\-O\fP switch.  The
  640. Xdefault value is 001.
  641. X.\"
  642. X.o1 P suffix
  643. X\fIsuffix\fP will be used as the extension of the contact sheet
  644. Xparameter files if the \fB\-g\fP switch is specified.  See the
  645. X\fB\-g\fP switch description for more details.  The default value is
  646. X``.icp''.
  647. X.\"
  648. X.o1 p prefix
  649. XName the contact sheets \fIprefix###.format\fP, where \fI###\fP is the
  650. Xnumber of the contact sheet and \fIformat\fP is the format of the
  651. Xcontact sheet.  The default value is ``ic\-''.
  652. X.\"
  653. X.o1 Q "quantization program"
  654. XUse \fIquantization program\fP to quantize the contact sheets.  The
  655. X\fIquantization program\fP should accept ppm format files as input and
  656. Xtake one numeric argument specifying the number of colors to be left in
  657. Xthe contact sheets.  It is possible to use a pipeline such as: ``cjpeg
  658. X\-Q 100 | djpeg \-q''.  The default value is: ``ppmquant \-fs''.
  659. X.\"
  660. X.o1 q n
  661. XQuantize the contact sheets down to \fIn\fP colors.  A value of 0 will
  662. Xturn off quantization.  The default value is 0.
  663. X.\"
  664. X.o0 R
  665. XWhen creating sheets, use right justification on the rows instead of
  666. Xthe default center justification.  If this option is used in
  667. Xconjunction with the \fB\-L\fP option, the options will negate each
  668. Xother.
  669. X.\"
  670. X.o1 r n
  671. XMake the contact sheets with \fIn\fP rows of images.  This switch is
  672. Xignored if the \fB\-a\fP switch is specified.  The default value is 7.
  673. X.\"
  674. X.o0 S
  675. XSort the file names taken from the command line (and, optionally, from
  676. Xthe file specified with the \fB\-n\fP switch) into alphabetical order
  677. Xbefore making the sheet.
  678. X.\"
  679. X.o0 s
  680. XBe silent.  Don't output anything except warnings and fatal errors.
  681. X.\"
  682. X.o1 T color
  683. XUse \fIcolor\fP as the color of the text of the image labels.  The
  684. Xformat of \fIcolor\fP may be any that \fIpgmtoppm\fP understands.  The
  685. Xdefault value is ``white''.
  686. X.\"
  687. X.o1 t tmpdir
  688. XUse \fItempdir\fP to hold \fIicontact\fP's intermediate files.
  689. X\fIicontact\fP tries to minimize the amount of temporary space it
  690. Xneeds, but it's disk space requirements can be large depending upon the
  691. Xparticular operation it is performing.  If you have a tiny /tmp
  692. Xdirectory, you'll want to use this switch to aim \fIicontact\fP at a
  693. Xlarger chunk of disk.  The default value is ``/tmp''.
  694. X.\"
  695. X.o0 U
  696. XDelete duplicate entries in the list of image file names, even if they
  697. Xdiffer in capitalization.  For example, ``Foo.gif'' and ``foo.gif''
  698. Xwould compare as if the same.  The first file with any particular name
  699. Xwill make it through, but following files with the same name will be
  700. Xdeleted from the file name list.  The default is to allow duplicate
  701. Xfile names.  If this command is used with the \fB\-u\fP switch, the
  702. X\fB\-u\fP switch will be ignored and the comparisons will be done in a
  703. Xcase insensitive fashion.
  704. X.\"
  705. X.o0 u
  706. XDelete duplicate entries in the list of image file names.  The first
  707. Xfile with any particular name will make it through, but following files
  708. Xwith the same name will be deleted from the file name list.  The
  709. Xdefault is to allow duplicate file names.  If this command is used with
  710. Xthe \fB\-U\fP switch, the \fB\-U\fP switch will be override and the
  711. Xcomparisons will be done in a case insensitive fashion.
  712. X.\"
  713. X.o0 v
  714. XCause all sorts of possibly interesting output to be printed to the
  715. Xscreen.  The output includes the current parameters of \fIicontact\fP
  716. Xand all the shell commands it is running.  If you're having difficulty
  717. Xgetting \fIicontact\fP to do what you want it to do, try using this
  718. Xswitch to see what \fIicontact\fP is doing behind your back.
  719. X.\"
  720. X.o1 w n
  721. XMake each image in the contact sheets a maximum of \fIn\fP pixels
  722. Xwide.  The aspect ratio of the images will not be changed.  This switch
  723. Xwill be ignored if the \fB\-Y\fP switch is also specified.  The default
  724. Xvalue is 100.
  725. X.\"
  726. X.o0 X
  727. XThis switch will make all the images the same width.  Their heights
  728. Xwill be whatever they are when the image comes out of \fIpnmscale\fP.
  729. XThe aspect ratios of the images will not be changed.  Wide images will
  730. Xbe short and tall images will be tall.  This switch cannot be used with
  731. Xthe \fB\-i\fP or \fB\-Y\fP switches.
  732. X.\"
  733. X.o1 x n
  734. XWhen used with the \fB\-a\fP switch, \fIn\fP specifies the width of the
  735. Xoutput sheets in pixels.  This switch will be ignored unless the
  736. X\fB\-a\fP switch is specified.  The default value is 1152.
  737. X.\"
  738. X.o0 Y
  739. XThis switch will make all the images the same height.  Their widths
  740. Xwill be whatever they are when the image comes out of \fIpnmscale\fP.
  741. XWide images will be wide and tall images will be skinny.  The aspect
  742. Xratios of the images will not be changed.  This switch cannot be used
  743. Xwith the \fB\-i\fP or \fB\-X\fP switches.
  744. X.\"
  745. X.o1 y n
  746. XWhen used with the \fB\-a\fP switch, \fIn\fP specifies the height of
  747. Xthe output sheets in pixels.  This switch will be ignored unless the
  748. X\fB\-a\fP switch is specified.  The default value is 900.
  749. X.\"
  750. X.o0 Z
  751. XThis switch will prevent the images from being scaled.  For obvious
  752. Xreasons, you should probably only use this option when the input images
  753. Xare fairly small.  This switch cannot be used with the \fB\-i\fP
  754. Xswitches.  If it is used with the \fB\-X\fP, \fB\-Y\fP, \fB\-w\fP, or
  755. X\fB\-h\fP switches, \fB\-Z\fP will override.
  756. X.\"
  757. X.o1 z "color [color ...]"
  758. XWhen used with the \fB\-B\fP switch, the layers of the borders around
  759. Xthe images will be striped (from the inside out) with the colors
  760. Xspecified after this switch.  Double quotes should be used to group the
  761. Xcolors together with white space in between.  The colors can be in any
  762. Xformat that \fIppmmake\fP understands.  The default is ``white black
  763. Xwhite''.
  764. X.\"
  765. X.SH ENVIRONMENT
  766. X.IP "\fBTMPDIR, TEMPDIR\fP"
  767. XThese environment variables can be used to set the location of
  768. X\fIicontact\fP's temporary directory.  If both \fBTMPDIR\fP and
  769. X\fBTEMPDIR\fP are set, a warning will be printed and the value of
  770. X\fBTMPDIR\fP will be used.  If only one of them is set, that one will
  771. Xbe used.  This value will be overridden if the \fB\-t\fP switch is used
  772. Xon the command line or in the configuration file.
  773. X.\"
  774. X.SH FILES
  775. X.IP "configuration file"
  776. XThe name of the default configuration file is \fB.icrc\fP in your home
  777. Xdirectory.  The proper syntax of this file is as follows:  Comments
  778. Xbegin with a \fB#\fP and terminate with a newline.  Lines may be
  779. Xblank.  Double quotes may be used to group words together after the
  780. Xkeyword \fBswitches\fP.  Configuration lines begin with one of the
  781. Xfollowing keywords:  \fBencode\fP, \fBdecode\fP, \fBswitches\fP, or
  782. X\fBquantize\fP.  Lines beginning with \fBencode\fP are used to define
  783. Xcommands \fIicontact\fP will use to encode files into a specific
  784. Xformat.  Lines beginning with \fBdecode\fP are used to define commands
  785. X\fIicontact\fP will use to decode files of a specific format.  Lines
  786. Xbeginning with \fBquantize\fP are used to define the quantization value
  787. Xof sheets created in a specific format.  The format of lines beginning
  788. Xwith \fBencode\fP, \fBdecode\fP or \fBquantize\fP is this:
  789. X.sp
  790. X.ce
  791. X<\fIkeyword\fP>\ <\fIformat\fP>\ <\fIvalue\fP>
  792. X.sp
  793. X<\fIformat\fP> may not contain white space, but <\fIvalue\fP> may.  If
  794. X<\fIkeyword\fP> is \fBquantize\fP, then <\fIvalue\fP> must be a non
  795. Xnegative integer.  The format of lines beginning with \fBswitches\fP is
  796. Xthis:
  797. X.sp
  798. X.ce
  799. X\fBswitches\fP\ <\fIcommand\ line\ switches\fP>
  800. X.sp
  801. X<\fIcommand\ line\ switches\fP> may be any set of switches that you can
  802. Xspecify on the command line and may contain white space.
  803. X.sp
  804. X.nf
  805. X.ft CW
  806. X# sample icontact configuration file
  807. X
  808. Xswitches    \-g                   # parameter file generation
  809. Xswitches    \-B                   # borders
  810. Xswitches    \-l                   # add labels
  811. Xswitches    \-b                   # basename(1) the labels
  812. Xswitches    \-S                   # sort all the filenames
  813. Xswitches    \-v                   # verbose
  814. Xswitches    \-a                   # automatic sizing
  815. Xswitches    \-x 640               # screen width
  816. Xswitches    \-y 480               # screen height
  817. Xswitches    \-Q ppmquant          # quantization program
  818. Xswitches    \-z "red white blue"  # stripes
  819. X# OR:
  820. X# switches  \-gBlBSvWax 640 \-y 480 \-Q ppmquant \-z "red white blue"
  821. X
  822. Xencode      jpg    cjpeg \-o
  823. Xdecode      jpg    djpeg
  824. X
  825. Xencode      ppm       
  826. Xdecode      ppm       
  827. X
  828. Xquantize    gif    256
  829. Xquantize    jpg    0
  830. X.ft R
  831. X.sp
  832. X.fi
  833. X.\"
  834. X.IP "contact sheet parameter files"
  835. XThese files are lists of file names (one per line) followed by the
  836. Ximage's \fIx\fP and \fIy\fP offsets into the contact sheet and then the
  837. Ximage's height and width.  They are created by using the \fB\-g\fP
  838. Xswitch.  These files allow blank lines and comments beginning with
  839. X\fB#\fP and terminating with a newline.
  840. X.\"
  841. X.IP \fBTMPDIR/icb\-$$\fP
  842. Xa temporary file for storing the image border when the \fB\-i\fP and
  843. X\fB\-B\fP switches are specified
  844. X.\"
  845. X.IP \fBTMPDIR/icc\-$$\fP
  846. Xtemporary file for storing a color pixmap for background colorization
  847. X.\"
  848. X.IP \fBTMPDIR/ice\-$$\fP
  849. Xa temporary file for holding the image pad when the \fB\-i\fP switch is
  850. Xspecified
  851. X.\"
  852. X.IP \fBTMPDIR/ici#\-$$\fP
  853. Xtemporary files for storing images before they are made into rows
  854. X.\"
  855. X.IP \fBTMPDIR/icp#\-$$\fP
  856. Xtemporary files for holding expanded sheets while \fIicontact\fP cuts
  857. Ximages out of them
  858. X.\"
  859. X.IP \fBTMPDIR/icr#\-$$\fP
  860. Xtemporary files for storing rows before they are made into sheets
  861. X.\"
  862. X.IP \fBTMPDIR/ict\-$$\fP
  863. Xa temporary file for storing labels and borders
  864. X.\"
  865. X.SH "SEE ALSO"
  866. X\fIbasename(1)\fP, \fIperl(1)\fP, \fIpbm(5)\fP, \fIpgm(5)\fP,
  867. X\fIppm(5)\fP, \fIpnm(5)\fP, \fIcjpeg(1)\fP, \fIdjpeg(1)\fP, \fIgs(1)\fP,
  868. X\fIgzip(1)\fP, \fIgunzip(1)\fP, \fIcompress(1)\fP, \fIhpcdtoppm(1)\fP
  869. X.\"
  870. X.SH DIAGNOSTICS
  871. XThe diagnostic messages are intended to be self explanatory.  If
  872. X\fIicontact\fP dies and tells you that a pipeline returned an
  873. Xunsuccessful exit code and you can't tell what caused the crash, try
  874. Xrunning the same command with the \fB\-v\fP switch.  You should then be
  875. Xable to see an error message indicating what part of the pipeline was
  876. Xnot successful.
  877. X.\"
  878. X.SH BUGS
  879. X.PP
  880. XIf an image's file name has dots in it that do not come before a
  881. Xrecognized file format extension, the unrecognized extensions will be
  882. Xignored and \fIicontact\fP will try to decode the image using the
  883. Xremaining extensions.  It may guess wrong, though, and the decode
  884. Xcommand may fail.
  885. X.PP
  886. X\fIicontact\fP allows you to specify stupid output formats like
  887. X``.gif.Z''.
  888. X.PP
  889. XWhen in automatic sheet sizing mode (\fB\-a\fP), if a single processed
  890. Ximage is larger than the dimensions of a sheet, this image will appear
  891. Xin a sheet all by itself, and the sheet will be larger than you
  892. Xspecified with \fB\-x\fP and \fB\-y\fP.
  893. X.PP
  894. XThe parameter file processing code will fail if it is used on filenames
  895. Xthat contain white space.
  896. X.PP
  897. XWhen images are cut out of previously made contact sheets by specifying
  898. Xa parameter file on the command line, they are not rescaled.  So, even
  899. Xthough you may have specified \fB\-w 100 \-h 100\fP this time, the
  900. Ximages cut from the previously made contact sheet will be the same size
  901. Xthey were when that sheet was first made.  This shouldn't be a problem
  902. Xfor you if you choose an image size early and stick with it.
  903. X.PP
  904. XIf a particular file name appears in two or more different parameter
  905. Xfiles on the command line, the image will be displayed more than once,
  906. Xbut the image used will be cut from the last parameter file listed.
  907. XA warning will be printed if this situation occurs.
  908. X.PP
  909. XThe dimensions of images specified in parameter files are listed as
  910. Xthe dimensions of the sheet the image was cut from when the \fB\-m\fP
  911. Xswitch is used.  The original size information for each image is not
  912. Xstored in the parameter files.
  913. X.\"
  914. X.SH AUTHOR
  915. XMark Hanson
  916. X.br
  917. Xmark%eggman.uucp@nosc.mil
  918. X.br
  919. X\&...!nosc!eggman!mark
  920. X.sp
  921. XBug reports, patch donations, suggestions, questions, and money are all welcome.
  922. X.sp
  923. X.\"
  924. X.SH COPYRIGHT
  925. X\fIicontact\fP is:
  926. X.br
  927. XCopyright (C) 1992, 1993, 1994  Mark B. Hanson
  928. X.br
  929. X.in +2m
  930. XPermission to use, copy, modify, and distribute this software and its
  931. Xdocumentation for any purpose and without fee is hereby granted,
  932. Xprovided that both the above copyright notice and this permission
  933. Xnotice appear in all copies and in supporting documentation.  This
  934. Xsoftware is provided ``as is'' without express or implied warranty.
  935. X.in -2m
  936. END_OF_FILE
  937. if test 22355 -ne `wc -c <'icontact-1.4/icontact.1'`; then
  938.     echo shar: \"'icontact-1.4/icontact.1'\" unpacked with wrong size!
  939. fi
  940. # end of 'icontact-1.4/icontact.1'
  941. fi
  942. if test -f 'icontact-1.4/xvtoppm.1' -a "${1}" != "-c" ; then 
  943.   echo shar: Will not clobber existing file \"'icontact-1.4/xvtoppm.1'\"
  944. else
  945. echo shar: Extracting \"'icontact-1.4/xvtoppm.1'\" \(1572 characters\)
  946. sed "s/^X//" >'icontact-1.4/xvtoppm.1' <<'END_OF_FILE'
  947. X.\" @(#)$Id: xvtoppm.1,v 1.7 1994/05/14 03:43:05 mark Exp $
  948. X.nh
  949. X.TH XVTOPPM 1 "xvtoppm-1.0 (13MAY94)"
  950. X.\"
  951. X.SH NAME
  952. Xxvtoppm \- convert from \fIxv\fP's .xvpics format to ppm
  953. X.\"
  954. X.SH SYNOPSIS
  955. X\fBxvtoppm\fP \fI.xvpics/file\fP
  956. X.\"
  957. X.SH DESCRIPTION
  958. X.PP
  959. X\fIxvtoppm\fP is a simple-minded script that converts \fIxv\fP's ``Visual
  960. XSchnauzer'' files into the ppm format.  This makes it possible to use all
  961. Xthose files to create a contact sheet without scaling down the original
  962. Ximages again.  Check out \fIicontact\fP's \fB\-Z\fP option which turns off
  963. Xscaling of the input files.  Also check out the \fB\-M\fP option which
  964. Xwill allow you to, say, double the size of each image.
  965. X.\"
  966. X.SH "SEE ALSO"
  967. X\fIxv(1)\fP, \fIicontact(1)\fP, \fIppm(1)\fP
  968. X.\"
  969. X.SH BUGS
  970. X.PP
  971. X\fIxvtoppm\fP doesn't take into account all the information on the first line
  972. Xof the input files.  If the format ever changes from the ``P7 332'' version
  973. Xcurrently in use, this program will fail.
  974. X.\"
  975. X.SH AUTHOR
  976. XMark Hanson
  977. X.br
  978. Xmark%eggman.uucp@nosc.mil
  979. X.br
  980. X\&...!nosc!eggman!mark
  981. X.sp
  982. XBug reports, patch donations, suggestions, questions,
  983. Xjob offers, and money are all welcome.
  984. X.sp
  985. X.\"
  986. X.SH COPYRIGHT
  987. X\fIxvtoppm\fP is:
  988. X.br
  989. XCopyright (C) 1992, 1993, 1994  Mark B. Hanson
  990. X.br
  991. X.in +2m
  992. XPermission to use, copy, modify, and distribute this software and its
  993. Xdocumentation for any purpose and without fee is hereby granted,
  994. Xprovided that both the above copyright notice and this permission
  995. Xnotice appear in all copies and in supporting documentation.  This
  996. Xsoftware is provided ``as is'' without express or implied warranty.
  997. X.in -2m
  998. END_OF_FILE
  999. if test 1572 -ne `wc -c <'icontact-1.4/xvtoppm.1'`; then
  1000.     echo shar: \"'icontact-1.4/xvtoppm.1'\" unpacked with wrong size!
  1001. fi
  1002. # end of 'icontact-1.4/xvtoppm.1'
  1003. fi
  1004. if test -f 'icontact-1.4/xvtoppm.c' -a "${1}" != "-c" ; then 
  1005.   echo shar: Will not clobber existing file \"'icontact-1.4/xvtoppm.c'\"
  1006. else
  1007. echo shar: Extracting \"'icontact-1.4/xvtoppm.c'\" \(2372 characters\)
  1008. sed "s/^X//" >'icontact-1.4/xvtoppm.c' <<'END_OF_FILE'
  1009. X/*
  1010. X** xvtoppm:  A simple-minded filter to convert xv's .xvpics to ppm format.
  1011. X**
  1012. X** @(#)$Id: xvtoppm.c,v 1.6 1994/03/02 06:53:09 mark Exp $
  1013. X**
  1014. X** Copyright (C) 1992, 1993, 1994  Mark B. Hanson
  1015. X**   Permission to use, copy, modify, and distribute this software and its
  1016. X**   documentation for any purpose and without fee is hereby granted,
  1017. X**   provided that both the above copyright notice and this permission
  1018. X**   notice appear in all copies and in supporting documentation.  This
  1019. X**   software is provided "as is" without express or implied warranty.
  1020. X**
  1021. X** to compile:
  1022. X**    cc -O xvtoppm.c -o xvtoppm
  1023. X**
  1024. X** to use:
  1025. X**    xvtoppm .xvpics/file.xv > file.ppm
  1026. X*/
  1027. X
  1028. X#include <stdio.h>
  1029. X
  1030. Xint main(argc, argv)
  1031. X    int argc;
  1032. X    char *argv[];
  1033. X{
  1034. X    FILE *file;
  1035. X    char magic[3];
  1036. X    char cmap[4];
  1037. X    char buffer[256];
  1038. X    int width;
  1039. X    int height;
  1040. X    int maxval;
  1041. X    unsigned char *data;
  1042. X    int i;
  1043. X
  1044. X    if (argc != 2) {
  1045. X    fprintf(stderr, "%s: usage: %s xv-icon-file\n", argv[0], argv[0]);
  1046. X    exit(1);
  1047. X    }
  1048. X
  1049. X    if ((file = fopen(argv[1], "r")) == NULL) {
  1050. X    fprintf(stderr, "%s: fopen(%s) failed!\n", argv[0], argv[1]);
  1051. X    exit(1);
  1052. X    }
  1053. X
  1054. X    if (fscanf(file, "%2s %3s\n", magic, cmap) != 2) {
  1055. X    fprintf(stderr, "%s: failed to read magic number!\n", argv[0]);
  1056. X    exit(1);
  1057. X    }
  1058. X
  1059. X    if (strncmp(magic, "P7", 2)) {
  1060. X    fprintf(stderr, "%s: yikes!  `%s' != `P7'!\n", argv[0], magic);
  1061. X    exit(1);
  1062. X    }
  1063. X
  1064. X    do {
  1065. X    if (fgets(buffer, 255, file) == NULL) {
  1066. X        perror("fgets");
  1067. X        exit(1);
  1068. X    }
  1069. X    } while (buffer[0] == '#');
  1070. X
  1071. X    if (sscanf(buffer, "%d %d %d\n", &width, &height, &maxval) != 3) {
  1072. X    fprintf(stderr, "%s: failed to read file dimensions!\n", argv[0]);
  1073. X    exit(1);
  1074. X    }
  1075. X
  1076. X    if ((data = (unsigned char *)malloc(width * height)) == NULL) {
  1077. X    fprintf(stderr, "%s: failed to malloc %d bytes!\n", argv[0],
  1078. X        width * height);
  1079. X    exit(1);
  1080. X    }
  1081. X
  1082. X    if (fread((char *)data, sizeof(char), width * height, file) !=
  1083. X        width * height) {
  1084. X    fprintf(stderr, "%s: failed to read %d bytes!\n", argv[0],
  1085. X        width * height);
  1086. X    exit(1);
  1087. X    }
  1088. X
  1089. X    fprintf(stdout, "P6\n%d %d\n255\n", width, height);
  1090. X
  1091. X    for (i = 0; i < width * height; i++) {
  1092. X    fprintf(stdout, "%c%c%c",
  1093. X        (data[i] & 0340),
  1094. X        (data[i] & 0034) << 3,
  1095. X        (data[i] & 0003) << 6);
  1096. X    }
  1097. X
  1098. X    free(data);
  1099. X
  1100. X    if (fclose(file) == EOF) {
  1101. X    fprintf(stderr, "%s: fclose(%s) failed!", argv[0], argv[1]);
  1102. X    exit(1);
  1103. X    }
  1104. X
  1105. X    exit(0);
  1106. X} /* main */
  1107. END_OF_FILE
  1108. if test 2372 -ne `wc -c <'icontact-1.4/xvtoppm.c'`; then
  1109.     echo shar: \"'icontact-1.4/xvtoppm.c'\" unpacked with wrong size!
  1110. fi
  1111. # end of 'icontact-1.4/xvtoppm.c'
  1112. fi
  1113. echo shar: End of archive 1 \(of 2\).
  1114. cp /dev/null ark1isdone
  1115. MISSING=""
  1116. for I in 1 2 ; do
  1117.     if test ! -f ark${I}isdone ; then
  1118.     MISSING="${MISSING} ${I}"
  1119.     fi
  1120. done
  1121. if test "${MISSING}" = "" ; then
  1122.     echo You have unpacked both archives.
  1123.     rm -f ark[1-9]isdone
  1124. else
  1125.     echo You still need to unpack the following archives:
  1126.     echo "        " ${MISSING}
  1127. fi
  1128. ##  End of shell archive.
  1129. exit 0
  1130.  
  1131. exit 0 # Just in case...
  1132.