TIFF Viewer & TIF Viewer (16-bit, GeoTIFF)

TIFF Viewer & TIF Viewer (16-bit, GeoTIFF), a VS Code extension by Zovo

TIFF viewer and TIF viewer for TIFF and GeoTIFF files in VS Code. Multi-page stacks, 16-bit and float data with auto contrast, pixel values, tags and PNG export. Offline.

Install in VS CodeOpen the Marketplace page

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.tiff-viewer, version 0.1.4.

Click a .tif or .tiff file and see it in VS Code, even when it is a 16-bit microscope image, a float32 elevation model or a 200-page stack.

A 16-bit synthetic fluorescence image open in TIFF Viewer inside VS Code. The cells are bright on a dark background because the auto contrast stretches values 234 to 3082 of 65535. The status bar reads x 430, y 360, value 317. The right panel lists size 1024 x 768, 16-bit unsigned integer, PackBits, big-endian, min 189, max 4830, a histogram and the TIFF tags.

Real output from VS Code 1.142 on macOS. The file is microscopy-16bit.tif, made by scripts/make-samples.js. scripts/e2e-vscode.mjs installed the packaged extension in a clean VS Code profile, opened the file, moved the pointer over a cell and saved the window through the debug port.

Quick start

  1. Install TIFF Viewer.
  2. Click any .tif or .tiff file in the Explorer. Scroll to zoom, drag to pan, and move the pointer to read values.

If another viewer opens, right-click the file and pick "Open in TIFF Viewer", or use "Reopen Editor With..." from the editor title menu. "TIFF Viewer: Get Started" in the Command Palette opens a short tour.

Questions people ask

Is TIFF Viewer & TIF Viewer (16-bit, GeoTIFF) free?

Yes. TIFF Viewer & TIF Viewer (16-bit, GeoTIFF) is free and MIT licensed.

How do I install TIFF Viewer & TIF Viewer (16-bit, GeoTIFF)?

Click "Install in VS Code" above, or search for zovo.tiff-viewer in the Extensions view.

What it reads

Supported
ContainersClassic TIFF and BigTIFF, little and big-endian, strips and tiles, chunky and planar
Sample types1, 2, 4, 8, 16, 32 and 64-bit unsigned and signed integers, 16, 32 and 64-bit float
ColourGray (BlackIsZero and WhiteIsZero), RGB and RGBA, palette, CMYK, YCbCr in JPEG
CompressionNone, LZW, Deflate, PackBits, JPEG, CCITT Group 3 and 4
PredictorsHorizontal (2) for every integer size, floating point (3)
PagesEvery page in the file, with thumbnails for the first 300

ZSTD, LERC, WebP and JPEG 2000 compressed pages are listed with their tags and a note that they can't be decoded.

Pages, channels and contrast

A 7-page stack. The page strip on the left shows a thumbnail for every page with its PageName, and page 3, Time point 3, is selected and shown at 190 percent.

Multi-page files get a page strip with thumbnails and page names. PageUp and PageDown (or J and K) move through the pages.

The View menu offers the RGB composite and each channel on its own. Files with three or more gray channels, such as fluorescence stacks stored as planar samples, can be shown as RGB or one channel at a time.

A planar 3-channel 16-bit BigTIFF with channel 2 selected. The status bar shows all three values under the pointer, C1 1114, C2 171 and C3 184.

The Values section lists min, max, mean, the range on screen, nodata and NaN counts, and a small histogram with the range marked. 8-bit images open as stored. Everything else opens with the 0.5 to 99.5 percentile stretch.

GeoTIFF

A float32 elevation model in UTM zone 33N with a nodata lake shown as transparent. The GeoTIFF section lists EPSG 32633, a 30 metre pixel size, the bounds and every GeoKey, and the status bar reads 1125.17 at E 518915, N 5244225 m.

When a page has ModelPixelScale, ModelTiepoint, ModelTransformation or GeoKeyDirectory tags, the panel adds a GeoTIFF section with the CRS, pixel size, units, bounds, GDAL nodata value and each GeoKey by name. The pointer readout adds easting and northing, or longitude and latitude for geographic rasters. Map tiles and reprojection are not part of this extension, so it works with no network.

Zoom, export and keys

ActionHow
ZoomMouse wheel or pinch, the + and - buttons, or the + and - keys
Fit and actual pixelsFit and 1:1 buttons, keys 0 and 1, or double click
PanDrag the image
Next and previous pagePageDown and PageUp, J and K, or the page strip
Tags panelTags button or T
ExportExport PNG saves the page as shown, with the channel and stretch you picked
Copy tagsCopy, next to the Tags heading, puts every tag on the clipboard as tab-separated text

Settings

SettingDefaultWhat it does
tiffViewer.maxFileMB1024Files up to this size are decoded. Larger files show a message and the tags of every page.
tiffViewer.askForRatingtrueAsk one time for a Marketplace rating after a few days of use. Nothing is sent anywhere.
tiffViewer.showSupportLinkstrueShow the small Sponsor and More free viewers links in the status line.

Privacy and safety

The extension makes no network calls and has no telemetry. The viewer is read-only. The TIFF file is never written, and the only file the extension writes is the PNG you save with Export PNG. The webview runs under a strict Content Security Policy, and tag text is shown as plain text.

Limits

License

MIT. The decoder uses UTIF.js (MIT) and pako (MIT). See THIRD-PARTY-NOTICES.md.

Install TIFF Viewer & TIF Viewer (16-bit, GeoTIFF)

Click the button to open VS Code and install it, or press Ctrl+P (Cmd+P on macOS) in VS Code and run ext install zovo.tiff-viewer.

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.tiff-viewer, version 0.1.4.

Source code and issues are on GitHub.

All our VS Code extensions

Support this work

If this extension saves you time, you can support the work on GitHub Sponsors. Monthly tiers start at $5, and one-time tiers start at $15. Sponsorship is optional, and the tool works the same without it.