Home| base |src.bin|graphic| ppmtopng Index

ppmtopng

Syntax
ppmtopng --help
ppmtopng [-name iname] [name]
ppmtopng -alpha alpha [-name iname] [name]
ppmtopng -nz [-name iname] [name]
Synopsis

Convert a Portable PixMap (PPM) image to a Portable Network Graphics (PNG) image.

Options
--helpprint the help message and exit.
-name inameset the image name in the output image to iname.
-alpha alphaset alpha channel for all pixels to the value given by alpha. The value can be given as a decimal, percentage or hexadecimal.
-nzset alpha channel to full on (0xff) for any non-zero value pixel in the input image.
nameinput image filename. If this is omitted the image will be read from standard input.
Description

Convert a Portable PixMap (PPM) image to a Portable Network Graphics (PNG) image.

The PNG image file is written to standard output.

Examples
ppmtopng -name "test" inp.ppm > out.png

Convert PPM file inp.ppm to the PNG file out.png. Set the name of the image to "test".

ppmtopng -nz inp.ppm > out.png

Convert PPM file inp.ppm to the PNG file out.png. The alpha channel is set to full on for any non-zero pixels in the input image.