PPMTOICR(1)
π PPMTOICR π
okay so this is ppmtoicr, and it lives in the Ppmtoicr User Manual, section 1 (General Commands). she's a Netpbm girlie and she has ONE job: turn your PPM into NCSA ICR. let's get into it bestie π
β¨ NAME β¨
ppmtoicr β convert a PPM image into NCSA ICR format
πΈ SYNOPSIS πΈ
ppmtoicr
[-windowname name]
[-expand expand]
[-display display]
[ppmfile]
little life hack: the minimum unique abbreviation of an option is acceptable, so you can shorten stuff as long as it's unambiguous π«Ά. You may also use double hyphens instead of single hyphen to denote options. And you may use white space in place of the equals sign to separate an option name from its value. so many options, so many vibes β¨
π¦ DESCRIPTION π¦
This program is part of Netpbm(1).
ppmtoicr reads a PPM file as input. Produces an NCSA Telnet Interactive Color Raster graphic file as output.
If ppmfile is not supplied, ppmtoicr reads from Standard Input. no file? no problem, she'll just vibe with stdin π
Interactive Color Raster (ICR) is a protocol for displaying raster graphics on workstation screens. The protocol is implemented in NCSA Telnet for the Macintosh version 2.3. The ICR protocol shares characteristics of the Tektronix graphics terminal emulation protocol. For example, escape sequences are used to control the display. periodt.
ppmtoicr will output the appropriate sequences to create a window of the dimensions of the input image, create a colormap of up to 256 colors on the display, then load the picture data into the window. it's giving full pipeline, no cap π₯
Note that there is no icrtoppm tool β this transformation is one way. it's a one-way ticket bestie, there is no coming back π
π OPTIONS π
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), ppmtoicr recognizes the following command line options:
-windownamename β Output will be displayed in name.
name must be printable characters, and not '^'.
Default is to use the input file name if specified on the command line, or "untitled" if the input is from Standard Input. In the former case, any unprintable character or '^' in the file name becomes a . in the window name. so basically she cleans up your messy filename for you, iconic behavior honestly π
-expandexpand β Output will be expanded on display by factor expand (For example, a value of2will cause four pixels to be displayed for every input pixel.) zoom zoom bestie πβ¨-displaydisplay β Output will be displayed on screen numbered display.
π EXAMPLES π
To display a PPM file named ppmfile using the protocol:
ppmtoicr ppmfile
This will create a window named ppmfile on the display with the correct dimensions for ppmfile, create and download a colormap of up to 256 colors, and download the picture into the window. You may achieve the same effect with the following sequence:
ppmtoicr ppmfile > filename
cat filename
To display a GIF file using the protocol in a window titled after the input file, zoom the displayed image by a factor of 2:
giftopnm giffile | ppmtoicr -windowname=giffile -expand=2
look at that pipe game. we love a little giftopnm collab π«Άπ§
π LIMITATIONS π
The protocol uses frequent fflush() calls to speed up display. If you save the output to a file for later display via cat, ppmtoicr will draw much more slowly. In either case, increasing the blocksize limit on the display will speed up transmission substantially. ngl the cat route is lowkey tragic on the speed front, so keep that in mind π
β SEE ALSO β
ppm(1)- NCSA Telnet for the Macintosh, University of Illinois at Urbana-Champaign (1989)
π HISTORY π
Until Netpbm 10.71 (June 2015), there was a -rle option documented, which was said to cause the output to use run length encoding compression. But because of a simple bug in option processing code, the option never had any effect. And the compression code did not look like it worked anyway and would take a fair amount of work to fix. Because it was unlikely anyone would ever use this program again, much less want to use run length encoding, we removed it from the documentation rather than fix the code.
so yeah. the -rle option was a whole lie. did nothing. never did anything. we just stopped talking about it π not me finding this out reading the changelogβ
π AUTHOR π
Copyright (C) 1990 by Kanthan Pillay (svpillay@Princeton.EDU), Princeton University Computing and Information Technology.
π 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/ppmtoicr.html
and that's the whole page bestie π«Ά this came to you from the netpbm documentation crew, dated 17 July 2022 β go forth and convert some PPMs, you absolute icon πΈβ¨
π¦ where this page comes from
- 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