---
name: "pnmtoddif"
section: "1"
platform: "linux"
package: "netpbm"
version: "10.86.51-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pnmtoddif"
---

# pnmtoddif(1)

Convert a PNM image to DDIF format

## NAME

pnmtoddif - Convert a PNM image to DDIF format

## SYNOPSIS

**pnmtoddif** \[**-resolution** *x* *y*\] \[*pnmfile* \[*ddiffile*\]\]

## DESCRIPTION

This program is part of **Netpbm**(1) .

**pnmtoddif** takes a PNM image and converts it into a DDIF image file.

**pnmtoddif** writes PBM format (bitmap) data as a 1 bit DDIF, PGM format data (grayscale) as an 8 bit grayscale DDIF, and PPM format (color) data as an 8,8,8 bit color DDIF.  **pnmtoddif** writes any DDIF image file uncompressed.  The data plane organization is interleaved by pixel.

In addition to the number of pixels in the width and height dimension, DDIF images also carry information about the size that the image should have, that is, the physical space that a pixel occupies. Netpbm images do not carry this information, hence you have to supply it externally.  The default of 75 dpi has the beneficial property of not causing a resize on most Digital Equipment Corporation color monitors.

(Until 2026, this manual said the default was 78 dpi, but it has always been implemented as 75, which is a typical resolution value.  We include this note in case 78 is actually more sensible and the program has just been defective all this time).

*This program works only on Netpbm input images with maxval 255.  For* *other images, it produces incorrect results.*  If you have a Netpbm image with maxval other than 255, use **pamdepth** to change it to 255 for use with this program.

## OPTIONS

In addition to the options common to all programs based on libnetpbm (most notably **-quiet**, see \
  Common Options ⟨index.html#commonoptions⟩ ), **pnmtoddif** recognizes the following command line option:

- **-resolution** *x* *y*

  The horizontal and vertical resolution of the output image in dots per inch.  Default is 75 dpi.

## ARGUMENTS

- *pnmfile*

  The filename for the image file in pnm format.  Default is to read from Standard Input.

- *ddiffile*

  The filename for the image file to be created in DDIF format.  By default, **pnmtoddif** writes to Standard Output.

## SEE ALSO

**pnm**(1)

## AUTHOR

Burkhard Neidecker-Lutz, Digital Equipment Corporation, CEC Karlsruhe *neideck@nestvx.enet.dec.com*

## DOCUMENT SOURCE

This manual page was generated by the Netpbm tool 'makeman' from HTML source.  The master documentation is at

-

  **http://netpbm.sourceforge.net/doc/pnmtoddif.html**
