Linux command
pnmtoddif 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Convert PNM to DDIF
pnmtoddif [input.pnm] > [output.ddif]
Specify the output resolution
pnmtoddif -resolution [300] [input.pnm] > [output.ddif]
Read from stdin
cat [input.pnm] | pnmtoddif > [output.ddif]
说明
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.
参数
- -resolution _N_
- Embed the given resolution (dots per inch) in the DDIF output. Defaults to 75 DPI.
FAQ
What is the pnmtoddif command used for?
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.
How do I run a basic pnmtoddif example?
Run `pnmtoddif [input.pnm] > [output.ddif]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -resolution _N_ do in pnmtoddif?
Embed the given resolution (dots per inch) in the DDIF output. Defaults to 75 DPI.