Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>RAW Image ViewerNew to Visual Studio Code? Get it now.
RAW Image Viewer

RAW Image Viewer

zouri

|
2 installs
| (0) | Free
Preview headerless RAW pixel buffers directly in Visual Studio Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

RAW Image Viewer

English | 简体中文

Preview headerless raw pixel data directly in Visual Studio Code. The extension uses a read-only custom editor and Canvas rendering, so it never modifies the source file.

Supported Formats

Format Memory layout
NV12 8-bit Y plane followed by a 2x2 subsampled, interleaved UV chroma plane
RGBA / BGRA 4 bytes per pixel
RGB / BGR 3 bytes per pixel
GRAY8 1 byte per grayscale pixel
UYVY / YUYV 8-bit packed YUV 4:2:2, 4 bytes per 2 pixels

YUV formats support BT.601 and BT.709 matrices with Limited or Full range.

Usage

  1. Open a .raw, .yuv, .nv12, .rgba, .rgb, .bgra, .bgr, .uyvy, or .yuyv file. RAW Image Viewer is used by default.
  2. For .bin files or other extensions, right-click the file in Explorer and select Open as RAW Image.
  3. Set the pixel format, width, height, and optional stride/offset values in the editor toolbar, then click Apply.

The extension remembers the most recently used parameters for each file in the workspace. Click Reset to restore the values inferred from the file name and the global defaults.

Automatic Inference

Dimensions, pixel format, and color matrix are inferred when they appear in the file name. For example:

camera_1920x1080_bt709_nv12.raw
capture-720x576-rec601-yuyv.bin

Format-specific extensions such as frame.nv12 and buffer.yuyv are also recognized. Values that cannot be inferred come from the rawImageViewer.default* settings.

For NV12, UYVY, and YUYV, the color matrix is inferred in this order:

  1. A bt709, bt-709, bt.709, rec709, or corresponding 601 marker in the file name.
  2. Without a marker, common SD dimensions use BT.601, while HD/UHD dimensions of 720p or greater use BT.709.
  3. Ambiguous dimensions such as 800x600 use rawImageViewer.defaultColorMatrix.

An explicit file-name marker takes precedence over dimension-based rules. For example, 1920x1080_bt601 selects BT.601. Toolbar selections can still override the inferred values and are remembered per file; click Reset on a previously configured file to run inference again.

Stride, Offset, and Multiple Frames

  • Stride is the number of bytes occupied by each row. Use 0 for the format's minimum tightly packed value.
  • UV stride applies only to the NV12 chroma plane. Use 0 to calculate it automatically.
  • Offset is the number of bytes skipped before the first frame.
  • When the remaining file data contains multiple complete frames, the frame controls at the bottom are enabled automatically. You can also switch frames with the left and right arrow keys.
  • Hover over the image to show the coordinates, raw channel values, source-data offset, and converted RGBA value in the status bar.

Local Development

Node.js 20 or later is required.

npm install
npm run check

Press F5 in VS Code to compile the project and open an Extension Development Host. To build a VSIX package:

npm run package

Current Limitations

  • Only 8-bit channel formats are currently supported. RAW10/RAW12, P010, Bayer, and floating-point pixels are not yet supported.
  • A single preview is limited to 100 million decoded pixels to prevent an incorrect size configuration from exhausting Webview memory.
  • Large multi-frame files are currently loaded into the Webview in full. Per-frame loading may be added in a future version.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft