PPMTOILBM(1)
π 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,ppmtoilbmwrites a HAM file (when-hamifis used), a 24bit file (when-24ifis used) or a direct color file (when-dcifis 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/-dcforceand-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-savememoption β 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;-maxplanesand-fixplanesare ignored. π-cmaponlyβ write a colormap file: only BMHD and CMAP chunks, no BODY chunk, nPlanes = 0. π-savememβ see the-compressoption.
πΈ 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
- debian bookworm: netpbm 2:11.01.00-2 Β· MIT
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms