img-dted(3tk)
π img-dted π
okay bestie, so you found yourself in the Img manual, staring at img-dted(3tk), and you're like "what is this". Don't worry. I got you. This is the Digital Terrain Elevation Data format handler, and it's lowkey iconic for exactly one job. Let's get into it. ποΈβ¨
β¨ NAME β¨
img-dted β Digital Terrain Elevation Data format (dted)
π SYNOPSIS π
package require img::dted ?2.1?
π¦ DESCRIPTION π¦
package require img::dted
So here's the tea: like literally every package in Img, this one does not give you any new commands. Nope. It just glows up the image command that Tk already has, so that command suddenly understands files holding raster images in the Digital Terrain Elevation Data format (dted). More specifically, img::dted extends Tk's photo image type (that's https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html if you wanna peek, iykyk).
The name of the new format handler is dted. And this handler comes with new extra configuration options. Head to the Options section for the full breakdown, bestie.
All of that means that in a call like:
image create photo ?name? ?options?
- Image data in dted format (that's the
-dataand-fileoptions) gets detected automatically. No cap. It just knows. π - The format name
dtedis recognized by the-formatoption. π
And bonus: the value of the -format option is treated as a list, and it can contain any of the special options listed in the Options section. So you can stack them in there. Slay.
β οΈ Important, bestie: the packageimg::dtedis not loaded when you dopackage require Img. You have to load it explicitly withpackage require img::dted. It's giving "I'm not coming unless you invite me specifically". π
πΈ NOTES πΈ
- This format handler interprets DTED elevation files as grayscale images. That's the whole vibe. π©Ά
- This format handler only supports read functionality. Read only. No writing, no editing, no main character output energy. π
π OPTIONS π
The handler provides the following options, and they're all little baddies:
-verbosebool β Available since version 1.4.0. If you set it to true, extra info about the read data gets printed tostdout. Default isfalse.-minshort β Available since version 1.4.0. Specify the minimum pixel value used for mapping the input data to 8-bit image values. If it's not specified or it's negative, the minimum value found in the image data is used.-maxshort β Available since version 1.4.0. Specify the maximum pixel value used for mapping the input data to 8-bit image values. Default is the maximum value found in the elevation data. If it's not specified or it's negative, the maximum value found in the image data is used.-gammadouble β Available since version 1.4.0. Specify a gamma correction to be applied when mapping the input data to 8-bit image values. Default is1.0.
π₯ SEE ALSO π₯
okay so the whole friend group, in order:
imgimg-bmpimg-dtedimg-flirimg-gifimg-icoimg-jpegimg-pcximg-pixmapimg-pngimg-ppmimg-psimg-rawimg-sgiimg-sunimg-tgaimg-tiffimg-windowimg-xbmimg-xpm
π 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 page, bestie!! π«Ά this is version 2.1 of the img-dted page from the Img manual, so go forth and read your terrain elevation data like the icon you are. mwah. π
ππ
π¦ where this page comes from
- ubuntu resolute: libtk-img-doc 1:2.1.0+dfsg1-1 Β· Tcl
- ubuntu stonking: libtk-img-doc 1:2.1.1+dfsg1-2 Β· Tcl
- 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