img-jpeg(n)
img-jpeg πβ¨
okay bestie so this is the manual page for img-jpeg β the Joint Picture Expert Group format handler, aka plain old jpeg. sit down, grab a strawberry π, we're gonna go through this together and it's gonna be so good.
β¨ SYNOPSIS β¨
package require img::jpeg ?2.1?
that's it. that's the whole vibe. π
π DESCRIPTION π
so like, first things first:
package require img::jpeg
like all the packages in Img, this one does not invent new commands, no cap. it extends the Tk command image that already exists, so that it supports files with raster images in the Joint Picture Expert Group format (jpeg). more specifically, img::jpeg extends Tk's photo image type β here's the link to that if you need it: https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html.
the name of the new format handler is jpeg. this handler brings new additional configuration options β go look at the Options section for the full breakdown, i'm not gonna gatekeep. π«Ά
all of that means: when you make a call like
image create photo ?name? ?options?
here's what's actually happening:
- image data in jpeg format (the options
-dataand-file) gets detected automatically. it just knows. main character energy. β¨ - the format name
jpegis recognized by the option-format.
and also, plot twist: the value of the option -format is treated as a list and may contain any of the special options listed in the Options section. lowkey powerful.
the package img::jpeg is a sub-package of Img. you can load it as a part of the complete Img support, via package require Img, or on its own, via package require img::jpeg. your call bestie π
π NOTES π
- Chapter Image Metadata of the Img manual page describes the parameters of the resolution related options. go read it, iykyk.
π OPTIONS π
the handler provides the following options:
-verbose boolβ supported for reading and writing. available since version 2.0. if you set it to true, extra info about the image you read or wrote gets printed tostdout. default isfalse. it's giving chatty β¨-fastβ supported for reading only. available since version 1.2.4. if you specify it, it activates a processing mode that's fast but only gives you low-quality information. speed over accuracy, we respect the hustle π-grayscaleβ supported for reading and writing. available since version 1.2.4. using this option forces incoming images to grayscale, and written images will be monochrome. no color, only mood π©Ά-optimizeβ supported for writing only. available since version 1.2.4. if specified, it makes the writer optimize the Huffman table used to encode the JPEG coefficients. nerdy and iconic π§-progressiveβ supported for writing only. available since version 1.2.4. if specified, it causes the creation of a progressive JPEG file. fancy!-quality nβ supported for writing only. available since version 1.2.4. it specifies the compression level as a quality percentage. the higher the quality, the less the compression β yes, they move in opposite directions, that's just how it is. the nominal range for n is0...100. useful values are in the range5...95. the default value is75.-smooth nβ supported for writing only. available since version 1.2.4. when used, the writer will smooth the image before performing the compression. values in the10...30are usually enough. the default is0, i.e. no smoothing. soft launch for your pixels πΈ-resolution xres ?yres?β supported for writing only. available since version 2.0. sets the resolution values of the written image file. if yres is not specified, it is set to the value of xres. if the option is not specified, the DPI and aspect values of the metadata dictionary are written. if no metadata values are available, no resolution values are written. it's very "if you know you know" π«Ά-xresolution xresβ supported for writing only. available since version 2.0. sets the horizontal resolution value of the written image file.-yresolution yresβ supported for writing only. available since version 2.0. sets the vertical resolution value of the written image file.
π SEE ALSO π
img, img-bmp, img-dted, img-flir, img-gif, img-ico, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
(yes, img-jpeg links to itself. she's self-referential and we love her for it π
)
π COPYRIGHT π
- Copyright (c) 1995-2025 Jan Nijtmans
<nijtmans@users.sourceforge.net> - Copyright (c) 2002-2025 Andreas Kupries
<andreas_kupries@users.sourceforge.net> - Copyright (c) 2003-2025 Paul Obermeier
<obermeier@users.sourceforge.net>
and that's the whole thing bestie, we ate and left no crumbs ππ this was img-jpeg, version 2.1, last touched 2.1, and it lives in the Img corner of the manual β periodt. go make some gorgeous JPEGs, you've got this πβ¨π¦
π¦ where this page comes from
- fedora 43: tkimg 2.1.1-1.fc43 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 43: tkimg 2.1.1-1.fc43 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.0-2.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.0-2.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.1-1.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.1-1.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- nixos 26.05: tkimg 2.1.1
- nixpkgs unstable: tkimg 2.1.1
- Copyright (c) 1995-2025 Jan Nijtmans <nijtmans@users\&.sourceforge\&.net>
- Copyright (c) 2002-2025 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- Copyright (c) 2003-2025 Paul Obermeier <obermeier@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms