PICTTOPPM(1)

πŸ“¦
version 11.13.03 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

picttoppm β€” bestie, this converts a Macintosh PICT file to a PPM. that's it. that's the whole job. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

picttoppm

[-verbose=n]

[-fullres]

[-noheader]

[-quickdraw] [-fontdir file]

[pictfile]

🌸 DESCRIPTION 🌸

okay so first things first: this program is part of Netpbm(1). it's in the family. it's one of the siblings. πŸ’…

picttoppm reads a PICT file (version 1 or 2) and spits out a PPM image. slay.

now, what IS PICT? PICT is an image format that Apple Computer cooked up in 1984 as the native format for Macintosh graphics. a PICT image is encoded in QuickDraw commands. the PICT format is a meta-format, which means it can be used for both bitmap images AND vector images. versatility queen πŸ‘‘. PICT is also known as the "Macintosh Picture" format, or the QuickDraw Picture format. iykyk.

PICT files are primarily used to exchange graphics between various Macintosh applications. it's giving "group project file sharing" energy.

and in MacOS X, PDF replaces PICT as the main graphics format. so PICT is like, the elder. still iconic though. 🫢


✨ OPTIONS ✨

on top of the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), picttoppm recognizes these command line options:

  • -fontdir file β€” makes the list of BDF fonts in file available for picttoppm to use when drawing text. the format of the fontdir file is down below ⬇️. this is IN ADDITION to the built-in fonts and those in the file fontdir.
  • -fullres β€” forces any images in the PICT file to be output with at least their full resolution. here's the tea: a PICT file may say "hey scale this contained image down before output" β€” this option says "no ❀️, we keep the sizes, we prevent information loss." but heads up bestie, this option disables all PICT operations except images. periodt.
  • -noheader β€” don't assume the first 512 bytes of the file are a header. all PICT files have such a header, but this is useful when you have PICT data that was not stored in the data fork of a PICT file. niche but necessary πŸ’…
  • -quickdraw β€” execute ONLY pure quickdraw operations. in particular, this turns off the interpretation of special PostScript printer operations.
  • -verbose=n β€” prints a whole bunch of information about the PICT file and the conversion process that only picttoppm hackers really care about. nerd mode activated 🧚

n is the verbosity level, 0-2.

before Netpbm 10.98 (March 2022), this option is a flag option that you specify multiple times to specify increasing verbosity. so like, times have changed bestie.

πŸ’€ LIMITATIONS πŸ’€

ngl, the PICT file format is a general drawing format, and picttoppm does not recognize ALL the drawing commands. but β€” and this is the slay part β€” it does fully implement all image commands and mostly implements line, rectangle, polygon and text drawing. it's useful for converting scanned images and some drawing conversion. not perfect, but she's trying πŸ’…

with -fullres, picttoppm ignores text drawing commands. beginning in Netpbm 10.45 (December 2008), it issues a warning message when it omits text for this reason. so at least it tells you 😭


πŸŽ€ FONTS πŸŽ€

some of the information in a PICT file is text, with a number indicating the font in which the text is supposed to be rendered. picttoppm has one built-in font, but you can add others by directing picttoppm to BDF font files β€” and you do that with font directory files.

picttoppm automatically uses the file named fontdir in the current directory, if it exists. you may specify an additional font directory file with the -fontdir option. double the fonts, double the fun 🫢

obviously the font definitions are strongly related to the Macintosh. you can find more font numbers and info about fonts in Macintosh documentation. do your research bestie πŸ“š

🌈 Font Directory File Format 🌈

each line in the file is either a comment or font information. a comment begins with #. the font information consists of 4 whitespace separated fields:

  1. the font number
  2. the font size in pixels
  3. the font style
  4. the name of a BDF file containing the font

the BDF format is defined by the X Window System and is beyond the scope of this document. not our problem, not our era πŸ’…

the font number indicates the type face. here's the list of known font numbers and their faces, bestie, memorize it:

  • 0 β€” Chicago
  • 1 β€” application font
  • 2 β€” New York
  • 3 β€” Geneva
  • 4 β€” Monaco
  • 5 β€” Venice
  • 6 β€” London
  • 7 β€” Athens
  • 8 β€” San Franciso
  • 9 β€” Toronto
  • 11 β€” Cairo
  • 12 β€” Los Angeles
  • 20 β€” Times Roman
  • 21 β€” Helvetica
  • 22 β€” Courier
  • 23 β€” Symbol
  • 24 β€” Taliesin

(yes, 10 is missing. we don't talk about 10. πŸ™ˆ)

the font style indicates a variation on the font. multiple variations may apply to a font, and the font style is the sum of the variation numbers, which are:

  • 1 β€” Boldface
  • 2 β€” Italic
  • 4 β€” Underlined
  • 8 β€” Outlined
  • 16 β€” Shadow
  • 32 β€” Condensed
  • 64 β€” Extended

so like, math but for fonts. add them up. iconic behavior ✨


πŸ‘‘ SEE ALSO πŸ‘‘

Inside Macintosh volumes 1 and 5, ppmtopict(1), ppm(1)


🫢 AUTHOR 🫢

Copyright 1993 George Phillips


πŸ“œ 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/picttoppm.html

okay that's the whole page bestie, we ate and left no crumbs πŸ’– this was the netpbm documentation, dated 17 June 2006, and the page is the Picttoppm User Manual (section 1, general commands manual, in case you were wondering) β€” go convert some vintage Macintosh graphics, you absolute main character πŸŒˆβœ¨πŸŽ€

πŸ“¦ where this page comes from