AdvancedImageViewer.WinForms 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package AdvancedImageViewer.WinForms --version 1.0.0
                    
NuGet\Install-Package AdvancedImageViewer.WinForms -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AdvancedImageViewer.WinForms" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AdvancedImageViewer.WinForms" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="AdvancedImageViewer.WinForms" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AdvancedImageViewer.WinForms --version 1.0.0
                    
#r "nuget: AdvancedImageViewer.WinForms, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AdvancedImageViewer.WinForms@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AdvancedImageViewer.WinForms&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=AdvancedImageViewer.WinForms&version=1.0.0
                    
Install as a Cake Tool

Advanced Image Viewer for WinForms

High-performance image viewer for Windows Forms with smooth pan, precision zoom, dynamic scaling, themes, and optimized rendering.

NuGet Version NuGet Downloads


Preview

<p align="center"> <img src="https://raw.githubusercontent.com/COxRIPMIZO/GRIT.UI.Controls/master/Demo%20%26%20Images/ImageViewer/ImageViewerDemo.gif" alt="Advanced Image Viewer Demo" width="900" /> </p>


Overview

AdvancedImageViewer is a modern, high-performance replacement for the standard WinForms PictureBox.

It provides smooth image navigation, high-resolution rendering, customizable themes, and programmatic control over zooming, panning, and overlays.

Built for:

  • .NET Framework 4.7.2+
  • .NET 6.0
  • .NET 8.0+

Features

Performance

  • Double-buffered rendering
  • Premultiplied-ARGB image caching
  • Reduced flickering during panning
  • Optimized rendering for large images
  • Smooth interaction with HD, 4K, and 8K images

Zoom & Pan

  • Scroll-wheel zoom
  • Mouse drag panning
  • Zoom range from 5% to 10000%
  • Automatic image fitting
  • Programmatic zoom control
  • Programmatic panning

Built-in Styles

Choose from five visual styles:

  • DashboardPremium
  • FluentGlass
  • MaterialFlat
  • SoftNeumorphic
  • Cyberpunk

Themes

Built-in theme support:

  • Light
  • Dark

HUD

Optional on-screen information:

  • Zoom percentage
  • Image dimensions
  • Cursor X/Y coordinates

Additional visual options:

  • Crosshair
  • Scanlines
  • Enhanced image scaling

Installation

Install using NuGet Package Manager:

Install-Package AdvancedImageViewer.WinForms

Or search for:

AdvancedImageViewer.WinForms

inside Visual Studio NuGet Package Manager.


Quick Start

Create Viewer

using GRIT.UI.WinForms;

var viewer = new AdvancedImageViewer();

viewer.Dock = DockStyle.Fill;

this.Controls.Add(viewer);

Load Image

Load an image synchronously:

viewer.LoadFromFile(@"C:\photos\sample.jpg");

For large images, use asynchronous loading:

await viewer.LoadFromFileAsync(
    @"C:\photos\massive_image.png"
);

Customization

Theme

viewer.ThemeMode = ThemeMode.Dark;

Style

viewer.ControlStyle = ViewerStyle.Cyberpunk;

Available styles:

DashboardPremium
FluentGlass
MaterialFlat
SoftNeumorphic
Cyberpunk

HUD

viewer.ShowHud = true;
viewer.ShowCrosshair = true;
viewer.ShowScanlines = true;

Image Quality

viewer.EnhanceImage = true;

EnhanceImage controls image scaling quality:

  • true — smooth image scaling
  • false — sharper pixel rendering

Zoom & Pan

Auto Fit

Automatically scale and center image:

viewer.AutoFit();

Zoom

Set zoom to 150%:

viewer.Zoom = 1.5f;

Pan

Move viewport horizontally:

viewer.PanBy(100, 0);

Custom Overlays

Use OverlayPaint to draw custom graphics over the image.

Example:

viewer.OverlayPaint += (s, e) =>
{
    // Define rectangle using RAW image coordinates
    Rectangle rawFaceRect =
        new Rectangle(500, 200, 300, 300);

    // Convert image coordinates to screen coordinates
    RectangleF screenRect =
        viewer.ImageToScreenF(rawFaceRect);

    // Draw overlay
    using (Pen pen = new Pen(e.Palette.Accent, 2f))
    {
        e.Graphics.DrawRectangle(
            pen,
            screenRect.X,
            screenRect.Y,
            screenRect.Width,
            screenRect.Height
        );
    }
};

The viewer automatically converts image coordinates to screen coordinates.

Your overlay follows zoom and pan automatically.


Complete Example

using GRIT.UI.WinForms;

public partial class MainForm : Form
{
    private readonly AdvancedImageViewer viewer;

    public MainForm()
    {
        InitializeComponent();

        viewer = new AdvancedImageViewer
        {
            Dock = DockStyle.Fill,
            ThemeMode = ThemeMode.Dark,
            ControlStyle = ViewerStyle.DashboardPremium,
            ShowHud = true,
            ShowCrosshair = true,
            EnhanceImage = true
        };

        Controls.Add(viewer);

        viewer.LoadFromFile(
            @"C:\photos\sample.jpg"
        );
    }
}

API Overview

Image Loading

viewer.LoadFromFile(path);

await viewer.LoadFromFileAsync(path);

Viewport

viewer.AutoFit();

viewer.Zoom = 1.5f;

viewer.PanBy(100, 0);

Appearance

viewer.ThemeMode = ThemeMode.Dark;

viewer.ControlStyle = ViewerStyle.Cyberpunk;

HUD

viewer.ShowHud = true;

viewer.ShowCrosshair = true;

viewer.ShowScanlines = true;

Image Rendering

viewer.EnhanceImage = true;

Coordinate Conversion

RectangleF screenRect =
    viewer.ImageToScreenF(rawRect);

Custom Rendering

viewer.OverlayPaint += OnOverlayPaint;

Supported Frameworks

Framework Support
.NET Framework 4.7.2+ Yes
.NET 6.0 Yes
.NET 8.0+ Yes

Use Cases

Why AdvancedImageViewer?

The standard WinForms PictureBox works well for basic image display.

AdvancedImageViewer adds the features needed for professional image-based applications.

Capability PictureBox AdvancedImageViewer
Image display Yes Yes
Smooth pan No Yes
Mouse zoom No Yes
5%–10000% zoom No Yes
Auto fit No Yes
Programmatic pan No Yes
Multiple styles No Yes
Light/Dark themes No Yes
HUD No Yes
Crosshair No Yes
Scanlines No Yes
Custom overlays Limited Yes
Coordinate conversion No Yes
Async loading No Yes

<p align="center"> <strong>AdvancedImageViewer.WinForms</strong> <br /> High-performance image viewing for Windows Forms. </p>

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
.NET Framework net472 is compatible.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 67 9/20/2026
1.0.1 96 9/13/2026
1.0.0 99 9/10/2026