EnglishFrenchSpanish

OnWorks favicon

web2png - Online in the Cloud

Run web2png in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command web2png that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


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

SYNOPSIS


web2png [-adnrtv] [directory...]

DESCRIPTION


Web2png is a front end for gif2png(1) that automatically converts entire web page
hierarchies from using GIFs to using PNGs. It does image conversion and patches IMG SRC
references in web pages.

The arguments to web2png must be directories; if none are given, the current directory is
assumed.

In each directory, web2png tries to convert every GIF to a PNG. It leaves alone GIFs that
have multiple images, because these will not display properly in all current browsers. It
also does not reconvert GIFs that already have corresponding PNGs (e.g. the same name
except for the .gif file extension). The original GIFs are left in place.

Web2png tracks successful conversions. It then looks at each HTML, secure HTML, HTML
inclusion, PHP page, JavaScript program or Cascading Style Sheet under the argument
directories (extensions html, shtml, .inc, .php, .js, .css). In these pages, it fixes each
reference to each successful converted GIF to point at the PNG. References in relative
HREF and BACKGROUND tags are recognized by filename and fixed (any base directory declared
by a BASE tag will be be prepended to the relative URL). References that are HTTP URLs are
matched against the list of convertible GIFs by basename; if there is such a match, the
contents of the URL is retrieved and compared to the convertible GIF. If both basename and
data match, the HTTP reference is fixed. If the pages are under RCS version control,
they're checked out for modification before being altered; otherwise, a copy of the
original of each modified web page is left in the same directory, with the additional
extension .bak.

The following options change the behavior of the program:

-a
Convert all GIF files, including those with multiple images.

-d
Delete originals. Removes all GIFs with corresponding PNGs, and all .bak files.

-n
Make no changes. With this option, web2png reports on what needs to be done (and on
GIFs that have multiple images), but neither converts GIFs nor touches web pages.

-r
Reverse. Restore all HTML/SHTML/PHP pages from the .bak files created by a previous
run (or, if the files were under version control, revert them). Remove PNGs with
corresponding GIFs.

-v
Verbose. Utter more trace information about the conversion process. Web2png can be run
on a directory that has already been partly converted by previous runs; it will do the
minimum necessary amount of work. The changes it makes will be fully reversible with
-r until you run it in -d mode. Web2png is written in Python. Python 1.5.2 or better
must be installed and accessible on your system in order for web2png to run.

NOTE


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

KNOWN PROBLEMS


The algorithm for fixing HTTP URLs is not foolproof. It could be confused into incorrectly
patching an HTTP URL reference to a GIF into an invalid reference to a PNG if the GIF
matches a local target GIF by both basename and binary content, but actually lives on
another host.

This program does not automatically convert CGIs; you'll have to do that by hand. Other
dynamic-content methods (such as server-side inclusions) may also require hand-hacking.

The program cannot tell converted from preexisting PNGs; if you have PNGs with the same
stem name as corresponding GIFs but carrying different information, the -r mode will
clobber them.

Use web2png online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    GenX
    GenX
    GenX is a scientific program to refine
    x-ray refelcetivity, neutron
    reflectivity and surface x-ray
    diffraction data using the differential
    evolution algorithm....
    Download GenX
  • 2
    pspp4windows
    pspp4windows
    PSPP is a program for statistical
    analysis of sampled data. It is a free
    replacement for the proprietary program
    SPSS. PSPP has both text-based and
    graphical us...
    Download pspp4windows
  • 3
    Git Extensions
    Git Extensions
    Git Extensions is a standalone UI tool
    for managing Git repositories. It also
    integrates with Windows Explorer and
    Microsoft Visual Studio
    (2015/2017/2019). Th...
    Download Git Extensions
  • 4
    eSpeak: speech synthesis
    eSpeak: speech synthesis
    Text to Speech engine for English and
    many other languages. Compact size with
    clear but artificial pronunciation.
    Available as a command-line program with
    many ...
    Download eSpeak: speech synthesis
  • 5
    Sky Chart / Cartes du Ciel
    Sky Chart / Cartes du Ciel
    SkyChart is a software to draw chart of
    the night sky for the amateur astronomer
    from a bunch of stars and nebulae
    catalogs. See main web page for full
    download...
    Download Sky Chart / Cartes du Ciel
  • 6
    GSmartControl
    GSmartControl
    GSmartControl is a graphical user
    interface for smartctl. It allows you to
    inspect the hard disk and solid-state
    drive SMART data to determine its
    health, as w...
    Download GSmartControl
  • More »

Linux commands

  • 1
    abc2abc
    abc2abc
    abc2abc - a simple abc
    checker/re-formatter/transposer ...
    Run abc2abc
  • 2
    abc2ly
    abc2ly
    abc2ly - manual page for abc2ly
    (LilyPond) 2.18.2 ...
    Run abc2ly
  • 3
    coqmktop
    coqmktop
    coqmktop - The Coq Proof Assistant
    user-tactics linker ...
    Run coqmktop
  • 4
    coqtop
    coqtop
    coqtop - The Coq Proof Assistant
    toplevel system ...
    Run coqtop
  • 5
    g.copygrass
    g.copygrass
    g.copy - Copies available data files in
    the current mapset search path to the
    user�s current mapset. KEYWORDS:
    general, map management ...
    Run g.copygrass
  • 6
    g.dirsepsgrass
    g.dirsepsgrass
    g.dirseps - Internal GRASS utility for
    converting directory separator
    characters. Converts any directory
    separator characters in the input string
    to or from na...
    Run g.dirsepsgrass
  • More »

Ad