LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pnmtoddif

convert a PNM image to a DEC DDIF document

TLDR

Convert PNM to DDIF
$ pnmtoddif [input.pnm] > [output.ddif]
copy
Specify the output resolution in DPI
$ pnmtoddif -resolution [300] [input.pnm] > [output.ddif]
copy
Read from stdin
$ cat [input.pnm] | pnmtoddif > [output.ddif]
copy

SYNOPSIS

pnmtoddif [-resolution dpi] [pnmfile]

DESCRIPTION

pnmtoddif translates a PNM image (PBM, PGM, or PPM) into a DEC DDIF (Digital Document Interchange Format) document on standard output. DDIF is a compound-document format used by DEC's CDA (Compound Document Architecture), most notably in DECwindows applications and document tools that ship with VMS and Ultrix.The converter preserves the bit depth of the input: a PBM becomes a 1-bit DDIF page, a PGM becomes grayscale, and a PPM becomes 24-bit color. The output resolution recorded in the DDIF header is -resolution (default 75 DPI), influencing how downstream viewers scale the image.

PARAMETERS

PNMFILE

Input PNM (PBM, PGM, or PPM) image. If omitted, pnmtoddif reads from standard input.
-resolution N
Embed the given resolution (dots per inch) in the DDIF output. Defaults to 75 DPI.

INSTALL

sudo apt install netpbm
copy
sudo dnf install netpbm
copy
sudo pacman -S netpbm
copy
sudo apk add netpbm
copy
sudo zypper install netpbm
copy
brew install netpbm
copy
nix profile install nixpkgs#netpbm
copy

CAVEATS

DDIF is a legacy format; viewers and converters outside of the historical DEC/Compaq toolchain are rare. There is no built-in converter from DDIF back to PNM in current Netpbm releases.

HISTORY

pnmtoddif was contributed to Netpbm to support interoperability with DEC Compound Document Architecture tooling. It remains in the distribution mostly for archival and legacy purposes.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid