1WEB2PNG(1)                         Graphics                         WEB2PNG(1)
2
3
4

NAME

6       web2png - convert a web tree from using GIFs to using PNGs
7

SYNOPSIS

9       web2png [-adnrtv] [directory...]
10

DESCRIPTION

12       Web2png is a front end for gif2png(1) that automatically converts
13       entire web page hierarchies from using GIFs to using PNGs. It does
14       image conversion and patches IMG SRC references in web pages.
15
16       The arguments to web2png must be directories; if none are given, the
17       current directory is assumed.
18
19       In each directory, web2png tries to convert every GIF to a PNG. It
20       leaves alone GIFs that have multiple images, because these will not
21       display properly in all current browsers. It also does not reconvert
22       GIFs that already have corresponding PNGs (e.g. the same name except
23       for the .gif file extension). The original GIFs are left in place.
24
25       Web2png tracks successful conversions. It then looks at each HTML,
26       secure HTML, HTML inclusion, PHP page, JavaScript program or Cascading
27       Style Sheet under the argument directories (extensions html, shtml,
28       .inc, .php, .js, .css). In these pages, it fixes each reference to each
29       successful converted GIF to point at the PNG. References in relative
30       HREF and BACKGROUND tags are recognized by filename and fixed (any base
31       directory declared by a BASE tag will be be prepended to the relative
32       URL). References that are HTTP URLs are matched against the list of
33       convertible GIFs by basename; if there is such a match, the contents of
34       the URL is retrieved and compared to the convertible GIF. If both
35       basename and data match, the HTTP reference is fixed. If the pages are
36       under RCS version control, they're checked out for modification before
37       being altered; otherwise, a copy of the original of each modified web
38       page is left in the same directory, with the additional extension .bak.
39
40       The following options change the behavior of the program:
41
42       -a
43           Convert all GIF files, including those with multiple images.
44
45       -d
46           Delete originals. Removes all GIFs with corresponding PNGs, and all
47           .bak files.
48
49       -n
50           Make no changes. With this option, web2png reports on what needs to
51           be done (and on GIFs that have multiple images), but neither
52           converts GIFs nor touches web pages.
53
54       -r
55           Reverse. Restore all HTML/SHTML/PHP pages from the .bak files
56           created by a previous run (or, if the files were under version
57           control, revert them). Remove PNGs with corresponding GIFs.
58
59       -v
60           Verbose. Utter more trace information about the conversion process.
61           Web2png can be run on a directory that has already been partly
62           converted by previous runs; it will do the minimum necessary amount
63           of work. The changes it makes will be fully reversible with -r
64           until you run it in -d mode. Web2png is written in Python. Python
65           1.5.2 or better must be installed and accessible on your system in
66           order for web2png to run.
67

NOTE

69       Sometimes it's possible to convert transparent GIFs without altering
70       the appearance of the page, by knowing from context that they will
71       always place within an area of fixed and solid color. Web2png can't
72       deduce when this will be, so it doesn't try; but it may be useful to
73       apply gif2png with the -b option by hand.
74

KNOWN PROBLEMS

76       The algorithm for fixing HTTP URLs is not foolproof. It could be
77       confused into incorrectly patching an HTTP URL reference to a GIF into
78       an invalid reference to a PNG if the GIF matches a local target GIF by
79       both basename and binary content, but actually lives on another host.
80
81       This program does not automatically convert CGIs; you'll have to do
82       that by hand. Other dynamic-content methods (such as server-side
83       inclusions) may also require hand-hacking.
84
85       The program cannot tell converted from preexisting PNGs; if you have
86       PNGs with the same stem name as corresponding GIFs but carrying
87       different information, the -r mode will clobber them.
88

SEE ALSO

90       gif2png(1)
91

AUTHORS

93       Eric S. Raymond <esr@thyrsus.com>, October 1999.
94
95       Slightly modified for Debian by Aaron Isotton <aaron@isotton.com>.
96
97
98
99web2png                           03/21/2019                        WEB2PNG(1)
Impressum