img-dted(3tk)

πŸ“¦
version 2.1.1 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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?
  1. Image data in dted format (that's the -data and -file options) gets detected automatically. No cap. It just knows. πŸ”
  2. The format name dted is recognized by the -format option. πŸ’…

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 package img::dted is not loaded when you do package require Img. You have to load it explicitly with package require img::dted. It's giving "I'm not coming unless you invite me specifically". πŸ™ˆ

🌸 NOTES 🌸

  1. This format handler interprets DTED elevation files as grayscale images. That's the whole vibe. 🩢
  2. 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:

  • -verbose bool β€” Available since version 1.4.0. If you set it to true, extra info about the read data gets printed to stdout. Default is false.
  • -min short β€” 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.
  • -max short β€” 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.
  • -gamma double β€” Available since version 1.4.0. Specify a gamma correction to be applied when mapping the input data to 8-bit image values. Default is 1.0.

πŸ”₯ SEE ALSO πŸ”₯

okay so the whole friend group, in order:

  • 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

  • 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