![]() |
PICTOOLSTools
for websites
|
![]() |
| with
nobg: Click me! |
by Zweibieren |
The garden tote above was for sale at roominakit.com. I scaled it to 1/6 and removed the background with nobg -t -f
2.2 -b
5x.5 gardentote.jpg Three or four
tries sufficed to find the
right -f and -b values. |
Pictools are my tools for managing physpics.com. Their focus is on building pages with lots of pictures (three thousand and counting). A Makefile system and directory structure provide a framework for organizing the build and deployment of pages. (They are built into a local structure and later uploaded quickly.) Templates allow different projects to display thumbnail pictures in different designs. A set of commands are available, though mostly they are used through the Makefiles. A description of how I use these commands may help you. Amongthe commands are a macro processor, genhtml, and a pair of commands for removing backgrounds from images: nobg and nosur. The later have a description page of their own. The rest of this page is a reference manual with pointers to the individual makefiles, templates, and commands. |
||
|
Pictools operates over three
directory trees: a source tree, a staging
area, and the installation on the server. Each of these trees has,
recursively, the same set of subdirectories, although sometimes the
source tree will have additional directories that do not get built to the staging area or uploaded to the server.
Here is an outline of a directory tree, say C:\websrc ![]() There are two other trees with the same shape, one on the same host, perhaps at C:\physpics.com, and the other on the server, say physpics.com:httpdocs/. The images directories contains pictures, icons and graphics. For instance, the image just above is C:\websrc\pictools\images\dirtree.png. However, large sets of photos are managed separately (see Using these Tools) from another child, pix. The subdirectories of annals have pix/ subdirectories. Resources directories are only on the source tree and contain files that are notes or serve as source for derivation of other files. Communication to the server is with ssh. You may need to ask your service provider to enable it. Also ask for writable access to a .ssh directory. In it you will want to have an authorized-keys files
established as
directed in ssh-keygen.
(Otherwise you have to give your password for every upload.)Most directories in the web sources tree have a Makefile, but only a small one. For a directory having subdirectories, the Makefile could be as little as SUBDIRS = subdirectory-1 subdirectory-2 ... include ${PICTOOLS}/MakeVars include ${PICTOOLS}/MakeTargets and if there are no subdirectories, not even the first line is needed. MakeVars defines variables for later use by MakeTargets. Between the two include lines, the client Makefile can set additional values or modify the values of variables already set. |
Environment
Variables
With the XP version of MSW, the environment variables are found by
clicking the "system" entry on the control panel, selecting the
"adnvanced tab, and finally clicking the "Environment Variables" button
at the bottom. |
Makefiles
Building and uploading from pictools directories is aided as described
in "Makefiles."
Most Makefiles
are then just the inclusion
of one or two files and the setting of a few variables. For
flexibility, the scheme allows ordinary make rules to be
included as well. |
Templates
These files contain $var values and are processed by genhtml to
replace those values appropriately. Examples of the files are shown and
described on the Templates
page. |
CommandsThese tools are described in detail in "Pictools Commands."Genhtml genhtml
[-n ncols]
[-c captionsfile]
[-t title]
[-f fdir] [-depend]
\
$includebody(${PICTOOLS}/copyright.html)$date(%e %b %Y
%I:%M %p) Genthumbs genthumbs
[maxdimension]Gencaps gencaps
[-p prefix]
[-d picturesdir]
[outputfilename|-]Splittxt splittxt captionsfileGenother genother
[-k] [[-d] picturesdir]Gensite gensite
[-n ncols]
[-w wrapperfile] captions.capGendirs gendirs
[-n ncols]
[-w templatefile]
[-v picwrapper] captions.capNobg, nosur. nobg
[-f fuzz-precent]
[-b blur-spread]
[-t] file
[outfile]nosur
[-f fuzz-precent]
[-b blur-spread]
[-t] file
[outfile]Prerr prerr textGentransparencytable gentransparencytable
... creates ${PICTOOLS}/transparencytable.png, a file required by
nosur
and
nobg. |
| Halo
Removal |
Documentation
|
|
Tools to make
backgrounds transparent without leaving haloes. Many icons are not by nature rectangular. Some have holes. In this icon, , the background color shines
through. When making gifs transparent, the original backround sometimes
adheres to the edge of the icon, leaving an ugly halo:
(see the little white bits). This package offers two scripts—nobg and
nosur—which make
backgrounds transparent and reduce halos: For more on halos, see the demonstration
by Bob Osala, who also describes a kludge needed for older versions of
InternetExplorer. For too much more on nobg and nosur, see the documentation
and samples.The halo tools are in Pictools and can be downloaded as shown just below. |
|
| Download
Pictools |
|
The
following are needed to use
pictools:
|
|
| Further information is in the README.
Click button to |
|
| Copyright 2008, Zweibieren |
12 Sep 2008 05:35 PM
|
Page
maintained
by
Zweibieren ![]() |