EnglishFrenchSpanish

OnWorks favicon

gif2png - Online in the Cloud

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

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


gif2png - convert GIFs to PNGs

SYNOPSIS


gif2png [-bdfghinprsvwO] [file.[gif]...]

DESCRIPTION


The gif2png program converts files in the obsolescent Graphic Interchange Format (GIF) to
Portable Network Graphics (PNG) format, an open W3C standard.

Normally gif2png converts each file named on the command line, leaving the original in
place. If a name does not have a .gif extension, the unmodified name will be tried first,
followed by the name with .gif appended. For each file named foo.gif, a foo.png will be
created.

When a multi-image GIF file named foo.gif is converted, gif2png creates multiple PNG
files, each containing one frame; their names will be foo.png, foo.p01, foo.p02 etc.

If no source files are specified and stdin is a terminal, gif2png lists a usage summary
and version information, then exits.

If no source files are specified, and stdin is a device or pipe, stdin is converted to
noname.png. (The program can't be a normal stdin-to-stdout filter because of the
possibility that the input GIF might have multiple images).

However, if filter mode is forced (with -f) stdin will be converted to stdout, with
gif2png returning an error code if the GIF is multi-image.

The program will preserve the information contained in a GIF file as closely as possible,
including GIF comment and application-data extension blocks. All graphics data (pixels,
RGB color tables) will be converted without loss of information. Transparency is also
preserved. There is one exception; GIF plain-text extensions are skipped.

The program automatically converts interlaced GIFs to interlaced PNGs. It detects images
in which all colors are gray (equal R, G, and B values) and converts such images to PNG
grayscale. Other images are converted to use the PNG palette type. Duplicate color entries
are silently preserved. Unused color-table entries cause an error message.

The action of the program can be modified with the following command-line switches:

-b {#}RRGGBB
Background. Replace transparent pixels with given RGB value, six hexadecimal digits
interpreted as two hexits each of red, green, and blue value. The value may optionally
be led with a #, HTML-style.

-d
Delete source GIF files after successful conversion.

-f
Filter mode. Convert GIF on stdin to PNG on stdout, return error if the GIF is
multi-image.

-m
Preserve file modification time. the PNG output gets the mod time of the input file,
not the time it was converted.

-g
Write gamma=1/2.2 and sRGB chunks in the PNG.

-h
Generate PNG color-frequency histogram chunks into converted color files.

-i
Force conversion to interlaced PNG files.

-n
Force conversion to non-interlaced PNG files.

-p
Display progress of PNG writing.

-r
Try to recover data from corrupted GIF files.

-s
Do not translate the GIF Software chunk to a PNG annotation.

-v
Verbose mode; show summary line, -vv enables conversion-statistics and debugging
messages.

-w
Web-probe switch; list GIFs that do not have multiple images to stdout. GIFs that fail
this filter cause error messages to stderr.

-O
Optimize; remove unused color-table entries. Normally these trigger an error message
and disable -d (but conversion is completed anyway). Also, use zlib compression level
9 (best compression) instead of the default level. The recovery algorithm enabled by
-r is as follows: Unused color table entries will not trigger an error message as they
normally do, but will still be preserved unless -O is also on, in which case they will
be discarded. Missing color tables will be patched with a default that puts black at
index 0, white at index 1, and supplies red, green, blue, yellow, purple and cyan as
the remaining color values. Missing image pixels will be set to 0. Unrecognized or
corrupted extensions will be discarded.

PROBLEMS


Naively converting all your GIFs at one go with gif2png is not likely to give you the
results you want. Animated GIFs cannot be translated to PNG, which is a single-image
format.

The web-probe switch is intended to be used with scripts for converting web sites. In
versions of this tool up to 2.5.2 it filtered out GIFs with transparency as well as GIFs
with animations, but support for PNG transparency has been universal in browsers since
about 2006.

STANDARDS AND SPECIFICATIONS


Copies of the GIF89 specification are widely available on the Web; search for "GRAPHICS
INTERCHANGE FORMAT". The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated.
The GIF format was formerly covered by a blocking patent on LZW compression, but it
expired in June 2003.

The PNG home site at <http://www.libpng.org/pub/png/> has very complete information on the
PNG standard, PNG libraries, and PNG tools.

Use gif2png online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Psi
    Psi
    Psi is cross-platform powerful XMPP
    client designed for experienced users.
    There are builds available for MS
    Windows, GNU/Linux and macOS.. Audience:
    End Users...
    Download Psi
  • 2
    Blobby Volley 2
    Blobby Volley 2
    Official continuation of the famous
    Blobby Volley 1.x arcade game..
    Audience: End Users/Desktop. User
    interface: OpenGL, SDL. Programming
    Language: C++, Lua. C...
    Download Blobby Volley 2
  • 3
    SuiteCRM
    SuiteCRM
    SuiteCRM is the award-winning Customer
    Relationship Management (CRM)
    application brought to you by authors
    and maintainers, SalesAgility. It is the
    world�s mos...
    Download SuiteCRM
  • 4
    Poweradmin
    Poweradmin
    Poweradmin is a web-based DNS
    administration tool for PowerDNS server.
    The interface has full support for most
    of the features of PowerDNS. It has full
    support...
    Download Poweradmin
  • 5
    Gin Web Framework
    Gin Web Framework
    Gin is an incredibly fast web framework
    written in Golang that can perform up to
    40 times faster, thanks to its
    martini-like API and custom version of
    httprout...
    Download Gin Web Framework
  • 6
    CEREUS LINUX
    CEREUS LINUX
    CEREUS LINUX basado en MX LINUX con
    varios entornos de escritorios. This is
    an application that can also be fetched
    from
    https://sourceforge.net/projects/cereu...
    Download CEREUS LINUX
  • More »

Linux commands

  • 1
    aa-clickquery
    aa-clickquery
    aa-clickquery - program for querying
    click-apparmor DESCRIPTION: This program
    is used to query click-apparmor for
    information. USAGE: aa-clickquery
    --click-fra...
    Run aa-clickquery
  • 2
    aa-exec-click
    aa-exec-click
    aa-exec-click - program for executing
    click packages under confinement
    DESCRIPTION: This program is used to
    execute click package under AppArmor
    confinement. I...
    Run aa-exec-click
  • 3
    cpio
    cpio
    cpio - copy files to and from archives ...
    Run cpio
  • 4
    cpipe
    cpipe
    cpipe - copy stdin to stdout while
    counting bytes and reporting progress ...
    Run cpipe
  • 5
    FvwmSave
    FvwmSave
    FvwmSave - the Fvwm desktop-layout
    saving module ...
    Run FvwmSave
  • 6
    FvwmSave1
    FvwmSave1
    FvwmSave - the FVWM desktop-layout
    saving module ...
    Run FvwmSave1
  • More »

Ad