PPM2TIFF(1)

πŸ’… NAME πŸ’…

ok so ppm2tiff β€” she makes a TIFF file out of PPM, PGM and PBM image files. bestie behavior, fr fr. this is the PPM2TIFF(1) page from the LibTIFF manual, and yes we're getting into it.

✨ Synopsis ✨

ppm2tiff [ options ] [ input.ppm ] output.tif

πŸ¦‹ DESCRIPTION πŸ¦‹

ppm2tiff takes a file that's in PPM, PGM or PBM format and converts it into a TIFF. like a glow-up but for image formats, no cap.

By default, the TIFF image is created with data samples packed (PlanarConfiguration=1), compressed with the Packbits algorithm (Compression=32773), and with each strip no more than 8 kilobytes. those are the default vibes πŸ’… but you can override them, or just explicitly specify them, with the options down below.

If the PPM file contains greyscale data, then the PhotometricInterpretation tag is set to 1 (min-is-black). otherwise it's set to 2 (RGB). she reads the room and picks accordingly ✨

If no PPM file is specified on the command line, ppm2tiff will read from the standard input. yes, she'll take it straight from stdin, very main character of her.


πŸŽ€ OPTIONS πŸŽ€

  • -c compress β€” specify a compression scheme to use when writing image data: -c none for no compression, -c packbits for PackBits compression (this one will be used by default πŸ’–), -c lzw for Lempel-Ziv & Welch compression, -c jpeg for baseline JPEG compression, -c zip for Deflate compression, -c g3 for CCITT Group 3 (T.4) compression, and -c g4 for CCITT Group 4 (T.6) compression. pick your fighter πŸ₯Š
  • -r striprows β€” write data with a specified number of rows per strip. by default the number of rows/strip is selected so that each strip is approximately 8 kilobytes. so if you don't say anything, she's doing the 8k math herself, periodt.
  • -R resolution β€” mark the resultant image to have the specified X and Y resolution, in dots/inch. both axes, one number, iconic.

πŸ‘€ SEE ALSO πŸ‘€

  • tiffinfo (1)
  • tiffcp (1)
  • tiffmedian (1)
  • libtiff (3tiff)

go read those too, iykyk 🫢


πŸ’œ AUTHOR πŸ’œ

LibTIFF contributors 🌈


1988-2025, LibTIFF contributors


ok that's the whole page bestie, you're literally a ppm2tiff expert now πŸ’… this was LibTIFF version 4.7, dated Jun 27, 2026 β€” slay, go convert something 🌸✨

πŸ“¦ where this page comes from