EnglishFrenchSpanish

OnWorks favicon

ppmtoxpm - Online in the Cloud

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

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


ppmtoxpm - convert a portable pixmap into an X11 pixmap

SYNOPSIS


ppmtoxpm [-name=xpmname] [-rgb=rgb-textfile] [-alphamask=pgmfile] [ppmfile]

Minimum unique abbrevations are acceptable.

DESCRIPTION


Reads a portable pixmap as input. Produces X11 pixmap (version 3) as output which can be
loaded directly by the XPM library.

For example, to convert the file "dot" (found in /usr/include/X11/bitmaps), from xbm to
xpm one could specify

xbmtopbm dot | ppmtoxpm -name dot

or, with a rgb text file (in the local directory)

xbmtopbm dot | ppmtoxpm -name dot -rgb rgb.txt

OPTIONS


-name=xpmname
The -name option allows you to specify the prefix string which is printed in the
resulting XPM output. If not specified, will default to the filename (without
extension) of the <ppmfile> argument. If you do not specify -name or ppmfile,
(i.e. your input is from Standad Input), the prefix string defaults to the string
noname.

rgb=rgb-textfile
The -rgb option allows you to specify an X11 rgb text file for the lookup of color
name mnemonics. This rgb text file is typically the /usr/lib/X11/rgb.txt of the
MIT X11 distribution, but any file using the same format may be used. When
specified and a RGB value from the ppm input matches a RGB value from the <rgb-
textfile>, then the corresponding color name mnemonic is printed in the XPM's
colormap. If you don't specify -rgb or if the RGB values don't match, then
ppmtoxpm produces the color specifications in the #RGB, #RRGGBB, #RRRGGGBBB, or
#RRRRGGGGBBBB hexadecimal format.

-alphamask=pgmfile
This option names a PGM file to use as an alpha (transparency) mask. The file must
contain an image the same dimensions as the input image. ppmtoxpm marks as
transparent any pixel whose position in the alpha mask image is at most half white.

If you don't specify -alphamask, ppmtoxpm makes all pixels in the output opaque.

ppmcolormask is one way to generate an alpha mask file. You might also generate it
by extracting transparency information from an XPM file with the -alphaout option
to xpmtoppm. There are similar options on other Netpbm converters that convert
from formats that include transparency information too.

LIMITATIONS


An option to match the closest (rather than exact) color name mnemonic from the rgb text
would be a desirable enhancement.

Truncation of the least significant bits of a RGB value may result in nonexact matches
when performing color name mnemonic lookups.

Use ppmtoxpm online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Phaser
    Phaser
    Phaser is a fast, free, and fun open
    source HTML5 game framework that offers
    WebGL and Canvas rendering across
    desktop and mobile web browsers. Games
    can be co...
    Download Phaser
  • 2
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 3
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 4
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 5
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 6
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • More »

Linux commands

Ad