JPG(1)
π¦ JPG(1) β General Commands Manual π¦
okay bestie, gather round: this is the whole jpg / gif / png / ppm / bmp / yuv / ico / togif / toppm / topng / toico situation, and yes itβs giving βtiny image tools, big main-character energy.β π
β¨
πΈ NAME πΈ
jpg, gif, png, ppm, bmp, yuv, ico, togif, toppm, topng, toico β view and convert pictures. πΌοΈπ
π SYNOPSIS π
jpg [ -39cdefFkJrtv ] [ file ... ]
gif [ -39cdektv ] [ file ... ]
png [ -39cdektv ] [ file ... ]
ppm [ -39cdektv ] [ file ... ]
bmp [ file ]
yuv [ file ]
togif [ -c comment ] [ -l loopcount ] [ -d msec ] [ -t transindex ] [
file ... [ -d msec ] file ... ]
toppm [ -c comment ] [ file ]
topng [ -c comment ] [ [ -g gamma ] [ file ]
ico [ file ]
toico [ file ... ]
π DESCRIPTION π
These programs read, display, and write image files in public formats. jpg, gif, png, ppm, bmp, and yuv read files in the corresponding formats and, by default, display them in the current window; options cause them instead to convert the images to Plan 9 image format and write them to standard output. togif, toppm, and topng read Plan 9 images files, convert them to GIF, PPM, or PNG, and write them to standard output. π
The default behavior of jpg, gif, and ppm is to display the file, or standard input if no file is named. Once a file is displayed, typing a character causes the program to display the next image. Typing a q, DEL, or control-D exits the program. For a more user-friendly interface, use page(1), which invokes these programs to convert the images to standard format, displays them, and offers scrolling, panning, and menu-driven navigation among the files. π
These programs share many options:
β¨ shared options energy β¨
-eβ Disable Floyd-Steinberg error diffusion, which is used to improve the appearance of images on color-mapped displays, typically with 8 bits per pixel. Primarily useful for debugging; if the display has true RGB color, the image will be displayed in full glory.-kβ Convert and display the image as a black and white (really grey-scale) image.-vβ Convert the image to an RGBV color-mapped image, even if the display has true RGB color.-dβ Suppress display of the image; this is set automatically by any of the following options:-c,-9,-t,-3.-cβ Convert the image to a Plan 9 representation, as defined byimage(7), and write it to standard output.-9β Like-c, but produce an uncompressed image. This saves processing time, particularly when the output is being piped to another program such aspage(1), since it avoids compression and decompression.-tβ Convert the image, if it is in color, to a true color RGB image.-3β Like-t, but force the image to RGB even if it is originally grey-scale.
Jpg has two extra options used to process the output of the LML video card:
π« jpgβs extra LML video-card options π«
-fβ Merge two adjacent images, which represent the two fields of a video picture, into a single image.-Fβ The input is a motion JPEG file, with multiple images representing frames of the movie. Sets-f.
The togif and toppm programs go the other way: they convert from Plan 9 images to GIF and PPM, and have no display capability. Both accept an option -c to set the comment field of the resulting file. If there is only one input picture, togif converts the image to GIF format. If there are many files, though, it will assemble them into an animated GIF file. The options control this process:
π togif / toppm conversion tea π
-lloopcountβ By default, the animation will loop forever;loopcountspecifies how many times to loop. A value of zero means loop forever and a negative value means to stop after playing the sequence once.-dmsecβ By default, the images are displayed as fast as they can be rendered. This option specifies the time, in milliseconds, to pause while displaying the next named file.
Gif translates files that contain a transparency index by attaching an alpha channel to the converted image. π¦
πͺ ico / toico icon behavior πͺ
Ico displays a Windows icon (.ico) file. If no file is specified, ico reads from standard input. Icon files contain sets of icons represented by an image and a mask. Clicking the right button pops up a menu that lets you write any iconβs image as a Plan 9 image (widthxheight.image), write any iconβs mask as a Plan 9 image (widthxheight.mask), or exit. Selecting one of the write menu items yields a sight cursor. Move the sight over the icon and right click again to write.
Toico takes a list of Plan 9 image files (or standard input) and creates a single icon file. The masks in the icon file will be the white space in the image. The icon file is written to standard output.
πΎ SOURCE πΎ
/src/cmd/jpg
π SEE ALSO π
π BUGS π
Writing an animated GIF using togif is a clumsy undertaking.
Thatβs a wrap on JPG(1) from the General Commands Manual π source: /src/cmd/jpg Β· footer was just JPG(1) again, no separate version or date shown π«Άβ¨
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms