PPMLABEL(1)
π ppmlabel β the manual, but make it cute π
okay bestie, so this is ppmlabel, from the Ppmlabel User Manual, section 1 of the General Commands Manual. it literally just adds text to a PPM image and honestly? she serves. let's get into it π
β¨ NAME β¨
ppmlabel β add text to a PPM image π
β¨ SYNOPSIS β¨
ppmlabel
[-angle angle]
[-background { transparent | color } ]
[-color color]
[-file filename]
[-size
textsize]
[-text text_string]
[-x column]
[-y row]
...
[ppmfile]
πΈ EXAMPLE πΈ
okay so here's the vibe, look:
ppmlabel -x 50 -y 50 -text hello \
-angle -30 -text there \
testimg.ppm
π¦ DESCRIPTION π¦
This program is part of Netpbm(1). π«Ά
ppmlabel uses the text drawing facilities of libnetpbm's "ppmd" component to add text to a PBM image. You control the location, size, baseline angle, color of the text, and background color (if any) with command line arguments. You can specify the text on the command line or supply it in files. (yes, both. no, she's not picky. she's β¨flexibleβ¨.)
You can add any number of separate labels in a single invocation of ppmlabel, limited only by any restrictions your environment has on the number and size of program arguments (e.g. a shell's command size limit). so like, go off, but also your shell said "that's enough bestie" at some point. π
If you don't specify ppmfile, ppmlabel reads its input PPM image from Standard Input.
The output image goes to Standard Output. periodt.
A more sophisticated way to add a label to an image is to use pbmtext or pbmtextps to create an image of the text, then pamcomp to overlay it onto the base image. iykyk.
Another more general program is ppmdraw. It is slightly harder to use for simple labelling. lowkey a lot of power, highkey more work. π
π OPTIONS π
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), ppmlabel recognizes the following command line options:
The arguments on the ppmlabel command line are not options in the strict sense; they are commands which control the placement and appearance of the text being added to the input image. They are executed left to right, and any number of arguments may appear. so like, order matters, bestie. read them like a sentence. π
You can abbreviate any option to its shortest unique prefix. slay.
-angleangle β This option sets the angle of the baseline of subsequent text. angle is an integral number of degrees, measured counterclockwise from the row axis of the image. β¨-background{ transparent | color }β If the argument istransparent,ppmlabeldraws the text over the existing pixels in the image. If you specify a color (see the-coloroption below for information on how to specify colors),ppmlabelgenerates background rectangles enclosing subsequent text, and those rectangles are filled with that color. so it's giving "no notes" vs "here's a whole lil box for you" π-colorcolor β This option sets the color for subsequent text.
Specify the color (color) as described for the argument of the pnm_parsecolor() library routine.
-colour is an acceptable alternate spelling. (because apparently we're doing both. we love options.) π¬π§
-filefilename β This option causesppmlabelto read lines of text from the file named filename and draw it on successive lines. π-sizetextsize β This option sets the height of the tallest characters above the baseline to textsize pixels.-texttext_string β This option causesppmlabelto draw the specified text string. It advances the location for subsequent text down 1.75 times the current textsize. That lets you draw multiple lines of text in a reasonable manner without specifying the position of each line. queen behavior honestly π
Note that if you invoke ppmlabel via a shell command and your text string contains spaces, you'll have to quote it so the shell treats the whole string as a single token. E.g.
$ ppmlabel -text "this is my text" baseimage.ppm >annotatedimage.ppm
β οΈ no cap on this one β unquoted spaces and your shell will split that string into a million lil tokens and everything falls apart. use the quotes. π
-xcolumn β This option sets the pixel column at which subsequent text will be left justified. Depending on the shape of the first character, the actual text may begin a few pixels to the right of this point. so like, approximately here. she's doing her best. π«Ά-yrow β This option sets the pixel row which will form the baseline of subsequent text. Characters with descenders, such as"y,"will extend below this line. yes, they dangle. that's the whole point. πΈ
π LIMITATIONS π
Text strings are restricted to 7 bit ASCII. The text font used by ppmlabel doesn't include definitions for 8 bit ISO 8859/1 characters. so no fancy accented glyphs, she simply does not have them. π
When drawing multiple lines of text with a non-transparent background, it should probably fill the space between the lines with the background color. This is tricky to get right when the text is rotated to a non-orthogonal angle. likeβ¦ bestie tried. it's genuinely hard. π
π SEE ALSO π
ppmmake(1), ppmdraw(1), pbmtext(1), pbmtextps(1), pamcomp(1), ppm(1)
π AUTHOR π
Copyright (C) 1995 by John Walker (kelvin@fourmilab.ch) WWW home page: http://www.fourmilab.ch/
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, without any conditions or restrictions. This software is provided ``as is'' without express or implied warranty. (very generous, very iconic, we stan π)
π§ 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/ppmlabel.html
and that's the whole thing bestie!! πβ¨ this was netpbm documentation, dated 15 April 2006, and the original footer said Ppmlabel User Manual(1) β go add some text to some pixels, you absolute legend π¦π πΈ
π¦ 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