EnglishFrenchSpanish

OnWorks favicon

imgsizer - Online in the Cloud

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

This is the command imgsizer 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


imgsizer - automatically splice in height and width params for HTML IMG tags

SYNOPSIS


imgsizer [-d file] [--document-root file] [-h file] [--help file] [-n] [--no-overwrite]
[HTMLFile] [-v file] [--version]

OPTIONS


Display version information and exit.

Display usage information.

Directory where absolute image filenames (i.e, ones which contain a leading "/") may be
found.

-n, --no-overwwrite, .SH DESCRIPTION
The imgsizer script automates away the tedious task of creating and updating the
extension HEIGHT and WIDTH parameters in HTML IMG tags. These parameters help many
browsers (including the Netscape/Mozilla family) to multi-thread image loading,
instead of having to load images in strict sequence in order to have each one's
dimensions available so the next can be placed. This generally allows text on the
remainder of the page to load much faster.

This script will try create such attributes for any IMG tag that lacks them. It will
correct existing HEIGHT and WIDTH tags unless either contains a percent (%) sign, in which
case the existing dimensions are presumed to be relative and left unaltered.

This script may be called with no arguments. In this mode, it filters HTML presented on
stdin to HTML (unaltered except for added or corrected HEIGHT and WIDTH attributes) on
stdout. If called with file arguments, it will attempt to transform each file in place.
Each argument file is not actually modified until the script completes a successful
conversion pass.

The -d <directory> option sets the DocumentRoot, where images with an absolute filename
(i.e., ones which contain a leading "/") may be found. If none is specified, the
DocumentRoot defaults to the current working directory.

The -n (no-overwrite) opion prevents the program from overwriting existing width and
height tags if both are present.

Additional options may also be specified in the environmental variable "IMGSIZER". For
example, to avoid typing "imgsizer -d /var/www/docs" each time imgsizer is invoked, you
might tell sh (or one of its descendants):

IMGSIZER="-d /var/www/docs"; export IMGSIZER

or, if you use csh:

setenv IMGSIZER "-d /var/www/docs"

This script is written in Python, and thus requires a Python interpreter on the host
system. It also requires either the identify(1) utility distributed in the open-source
ImageMagick suite of image-display and manipulation tools, or a modern version of file(1)
and rdjpgcom(1). These utilities are used to extract sizes from the images; imgsizer
itself has no knowledge of graphics formats. The script will handle any image format known
to identify(1) including PNG, GIF, JPEG, XBM, XPM, PostScript, BMP, TIFF, and anything
else even remotely likely to show up as an inline image.

NOTE


The -q, -l, and -m options of the 1.0 versions are gone. What they used to do has been
made unnecessary by smarter logic.

Use imgsizer online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Osu!
    Osu!
    Osu! is a simple rhythm game with a well
    thought out learning curve for players
    of all skill levels. One of the great
    aspects of Osu! is that it is
    community-dr...
    Download Osu!
  • 2
    LIBPNG: PNG reference library
    LIBPNG: PNG reference library
    Reference library for supporting the
    Portable Network Graphics (PNG) format.
    Audience: Developers. Programming
    Language: C. This is an application that
    can also...
    Download LIBPNG: PNG reference library
  • 3
    Metal detector based on  RP2040
    Metal detector based on RP2040
    Based on Raspberry Pi Pico board, this
    metal detector is included in pulse
    induction metal detectors category, with
    well known advantages and disadvantages.
    RP...
    Download Metal detector based on RP2040
  • 4
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 5
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 6
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • More »

Linux commands

Ad