PPMTOILBM(1)

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

πŸ’– PPMTOILBM πŸ’–

okay bestie, we're in the Ppmtoilbm User Manual, straight out of the General Commands Manual section. this is the glow-up guide for turning your PPM pics into ILBM files and honestly? it ate. πŸŽ€


✨ NAME ✨

ppmtoilbm β€” convert a PPM image into an ILBM file πŸ¦‹


🌸 SYNOPSIS 🌸

ppmtoilbm

[-maxplanes|-mp N]

[-fixplanes|-fp N]

[-ham6|-ham8]

[{-dcbits|-dcplanes} r g b]

[ -normal|-hamif|-hamforce|-24if|-24force| -dcif|-dcforce|-cmaponly ]

[-ecs|-aga]

[-compress|-nocompress]

[-cmethod type]

[-map ppmfile]

[ppmfile]

πŸ’… DESCRIPTION πŸ’…

this program is part of Netpbm(1), periodt.

ppmtoilbm reads a PPM image as input. It produces an ILBM file as output. and bestie, it understands a whole menu of ILBM types, so no vibe check gets failed:

  • Normal ILBMs with 1-16 planes ✨
  • Amiga HAM with 3-16 planes 🌈
  • 24 bit πŸ’œ
  • Color map (BMHD + CMAP chunk only, nPlanes = 0) πŸŽ€
  • Unofficial direct color. 1-16 planes for each color component. πŸ‘‘

and the chunks it writes? let me list them like a receipts slide: BMHD, CMAP, CAMG (only for HAM), BODY (not for colormap files), plus the unofficial DCOL chunk for direct color ILBM. iconic. 🫢


πŸ‘‘ OPTIONS πŸ‘‘

so besides the options that every libnetpbm-based program gets (most famously -quiet, peep the Common Options), ppmtoilbm also recognizes these command line options:

✨ pro tip: options marked with a (*) can be prefixed with a "no", like -nohamif. and every single option can be abbreviated down to its shortest unique prefix. lowkey convenient, no cap.
  • -maxplanes | -mp n β€” (default 5, minimum 1, maximum 16) the max planes to write in a normal ILBM. if the image does not fit into <n> planes, ppmtoilbm writes a HAM file (when -hamif is used), a 24bit file (when -24if is used) or a direct color file (when -dcif is used) β€” or it just aborts with an error 😭.
  • -fixplanes | -fp b β€” (min 1, max 16) if a normal ILBM gets written, it will have exactly <n> planes. no negotiating. πŸ’…
  • -hambits | -hamplanes n β€” (default 6, min 3, max 16) pick the number of planes for a HAM picture. the current Amiga hardware only understands 6 and 8 planes, so for now bestie, please only use those values. πŸ™ˆ
  • -normal β€” turns off -hamif/-24if/-dcif, -hamforce/-24force/-dcforce and -cmaponly. also sets compression type to byterun1. this is the default. πŸ¦‹
  • -hamif (*)
  • -24if (*)
  • -dcif (*) β€” write a HAM/24bit/direct color file if the image does not fit into <maxplanes> planes.
  • -hamforce (*)
  • -24force (*)
  • -dcforce (*) β€” write a HAM/24bit/direct color file. just do it, no conditions. πŸ”₯
  • -dcbits r g b
  • -dcplanes r g b β€” (default 5, min 1, max 16). select the number of bits for red, green and blue in a direct color ILBM. 🌈
  • -ecs β€” shortcut for: -hamplanes 6 -maxplanes 5. this is the default. ⭐
  • -aga β€” shortcut for: -hamplanes 8 -maxplanes 8
  • -ham6 β€” shortcut for: -hamplanes 6 -hamforce
  • -ham8 β€” shortcut for: -hamplanes 8 -hamforce
  • -compress () β€” this is the default. it compresses the BODY chunk, and the default compression method is byterun1. heads up tho: compression requires building the ILBM image in memory. turning compression off allows stream-writing of the image, but the resulting file will usually be 30% to 50% larger 😬. another alternative is the -savemem option β€” that keeps memory requirements for compression at a minimum, but it is *very slow. 🐌
  • -cmethod none|byterun1 β€” this option does the same thing as -compress.
  • -map ppmfile β€” write a normal ILBM using the colors in <ppmfile> as the colormap. the colormap file also determines the number of planes; -maxplanes and -fixplanes are ignored. πŸ‘€
  • -cmaponly β€” write a colormap file: only BMHD and CMAP chunks, no BODY chunk, nPlanes = 0. πŸ’€
  • -savemem β€” see the -compress option.

🌸 LIMITATIONS 🌸

HAM pictures will always get a grayscale colormap; a real color selection algorithm might give better results. that's the tradeoff bestie 😭. but on the other hand? this allows row-by-row operation on HAM images, and all HAM images of the same depth (no. of planes) share a common colormap β€” which is genuinely useful for building HAM animations. slay. 🎬


πŸ¦‹ REFERENCES πŸ¦‹

Amiga ROM Kernel Reference Manual - Devices (3rd Ed.) Addison Wesley, ISBN 0-201-56775-X


πŸ’œ SEE ALSO πŸ’œ

ppm(1), ilbmtoppm(1)


πŸŽ€ HISTORY πŸŽ€

for about a year in 1993-1994, there was a -savemem option. the lore. πŸ™ˆ

there used to be a -floyd (aka -fs) option that was supposed to cause images to be dithered so that a larger number of colors in the PPM input could be represented in a smaller number of colors in the ILBM output. but it was never documented. furthermore, developers discovered in January 2022 that the code for this was nonfunctional because of defects, and had been for a very long time and maybe always. finally,, this functions is not appropriate in the Netpbm philosophy, because dithering should be done by a separate dithering program, not a format conversion program. indeed, the programs ppmdither, pnmquant, and pnmremap can do this. πŸ’…

therefore, since Netpbm 10.98 (March 2022), the dithering code has not been in the program and any attempt to use the options fails with a simple invalid option message. but the -nofloyd and -nofs options remain, doing nothing as they were designed to do, and still not documented. this is just in case something uses those options, since the cost of maintaining them is so small. iconic behaviour honestly. 🫢


🌈 AUTHORS 🌈

Copyright (C) 1989 by Jef Poskanzer.

Modified October 1993 by Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)


πŸ’– 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/ppmtoilbm.html

and that's the whole page bestie! πŸ˜­πŸ’– this lil doc came from the netpbm documentation squad, dated 15 January 2022, and it's the Ppmtoilbm User Manual. go convert something gorgeous. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from