KGySoft.Drawing.Tools
Debugger visualizers and image editor apps built on KGy SOFT Drawing Libraries
Install / Use
/learn @koszeggy/KGySoft.Drawing.ToolsREADME
KGy SOFT Drawing Tools
The KGy SOFT Drawing Tools repository contains the KGy SOFT Imaging Tools application and some Debugger Visualizers for several GDI+, WPF and SkiaSharp types such as Bitmap, Metafile, Icon, BitmapData, Graphics, ImageSource, SKBitmap, etc. (see also below). The visualizers use KGy SOFT Imaging Tools to display these types visually that can be executed as a standalone application as well.
Table of Contents
KGy SOFT Imaging Tools
<details> <summary><strong>Overview</strong></summary><p/> <p align="center"> <img alt="KGySoft Imaging Tools on Windows 10" src="https://user-images.githubusercontent.com/27336165/124250655-5e760d80-db25-11eb-824f-195e5e1dbcbe.png"/> <br/><em>KGy SOFT Imaging Tools on Windows 10</em> </p>The Imaging Tools application makes possible to load images and icons from file, manipulate and save them into various formats. Several modifications are possible such as rotating, resizing, changing pixel format with quantizing and dithering, adjusting brightness, contrast and gamma, or even editing the palette entries of indexed bitmaps.
<p align="center"> <img alt="Changing Pixel Format with Quantizing and Dithering" src="https://user-images.githubusercontent.com/27336165/124250977-b3198880-db25-11eb-9f72-6fa51d54a9da.png"/> <br/><em>Changing Pixel Format with Quantizing and Dithering</em> </p></details> <details> <summary><strong>Compatibility</strong><a id="compatibility"/></summary><p/>💡 Tip: As a developer, you can access all of these image manipulaion functions by using KGy SOFT Drawing Libraries. It supports not just
System.Drawingtypes but also completely managed and technology agnostic bitmap data manipulation as well.
KGy SOFT Imaging Tools supports a wide range of platforms. Windows is supported starting with Windows XP but by using Mono you can execute it also on Linux. See the downloads for details.
<p align="center"> <img alt="KGy SOFT Imaging Tools on Ubuntu Linux, using dark theme" src="https://user-images.githubusercontent.com/27336165/124265526-157a8500-db36-11eb-8d3a-84e66259ce03.png"/> <br/><em>KGy SOFT Imaging Tools on Ubuntu Linux, using dark theme</em> </p> <p align="center"> <img alt="KGy SOFT Imaging Tools on ReactOS" src="https://github.com/koszeggy/KGySoft.Drawing.Tools/assets/27336165/0eef286a-2bb6-4639-b775-b6f75c0e7fba"/> <br/><em>KGy SOFT Imaging Tools on ReactOS</em> </p> </details> <details> <summary><strong>Localization</strong><a id="localization"/></summary><p/>KGy SOFT Imaging Tools supports localization from .resx files. New language resources can be generated for any languages, and you can edit the texts within the application. The changes can be applied on-the-fly, without exiting the application. If you switch to a right-to-left language, then the layout is also immediately applied (at least on Windows).
💡 Tip: As a developer, you can use KGy SOFT Core Libraries if you want something similar in your application.
The edited resources are saved in .resx files in the Resources subfolder of the application. Resources can be downloaded from within the application as well.
</details>📝 Note: If you create a localization for your language feel free to submit a new issue and I will make it available for everyone. Don't forget to mention your name in the translated About menu.
Debugger Visualizers
<details open> <summary><strong>Overview</strong></summary><p/>Imaging Tools is packed with several debugger visualizers for Visual Studio (compatible with all versions starting with Visual Studio 2008, and supports even .NET Core 2.1 and newer platform targets). When a type is debugged in Visual Studio and there is a debugger visualizer installed for that type, then a magnifier icon appears that you can click to open the visualizer.
<p align="center"> <img alt="Debugger Visualizer Usage" src="https://user-images.githubusercontent.com/27336165/124266849-c7ff1780-db37-11eb-9df8-f2149430da16.png"/> <br/><em>Debugger Visualizer Usage</em> </p>Either click the magnifier icon or choose a debugger visualizer from the drop down list (if more visualizers are applicable). Starting with Visual Studio 2022 version 17.9 Preview 1 a new type of visualizers are available that can remain open while stepping through the code. These debugger visualizers can be installed from the Visual Studio Marketplace only.
<p align="center"> <img alt="Debugging a Graphics instance" src="https://github.com/user-attachments/assets/7659a0a1-7a66-40a1-8fd7-9222823e52f0"/> <br/><em>Debugging Graphics in Visual Studio 2022</em> </p>For older Visual Studio versions the classic debugger visualizers are still available. They can be installed either from the Visual Studio Marketplace or by manual install
<p align="center"> <img alt="Debugging a Graphics instance" src="https://user-images.githubusercontent.com/27336165/124266974-f54bc580-db37-11eb-98e1-207c48590afa.png"/> <br/><em>Debugging a Graphics instance by the classic debugger visualizers</em> </p>Supported types:
- GDI+ types:
System.Drawing.Image: If executed for a non read-only variable or member of typeImage, then the actual value can be replaced by anyBitmaporMetafile.System.Drawing.Bitmap: Supports multi-page, multi-resolution and animatedBitmapinstances. The bitmap can be saved in many formats. In a non read-only context the bitmap can be replaced from file and its palette (for indexed bitmaps) can be edited.System.Drawing.Imaging.Metafile: Unlike many other image debugger visualizers, this one does not transform the metafile into a low-resolution PNG image because it is able to serialize the actual metafile content. The metafile can be saved into EMF/WMF formats. In a non read-only context the image can be replaced from file.System.Drawing.Icon: Supports compound and huge icons even in Windows XP. The icon can be saved, and in a non read-only context it can be replaced from file.System.Drawing.Imaging.BitmapData: Even for indexed data; however, the palette information cannot be retrieved.System.Drawing.Graphics: Supports both image and native window graphics.System.Drawing.Imaging.ColorPalette: In a non read-only context the colors can be edited.System.Drawing.Color: In a non read-only context the color can be replaced.
- WPF types:
System.Windows.Media.ImageSource: All derived types are supported, including vector images (System.Windows.Media.DrawingImage) and bitmaps (types derived fromSystem.Windows.Media.Imaging.BitmapSourcesuch asBitmapFrame,BitmapFrame,WriteableBitmap, etc.). Vector images are displayed as bitmaps, adjusted to the size of the primary display.System.Windows.Media.Imaging.BitmapPalette: Color entries can be examined individually.System.Windows.Media.Color: sRGB, ScRGB, and colors with context profile are all supported.
- SkiaSharp types:
SkiaSharp.SKBitmap: All color/alpha types of any color space are supportedSkiaSharp.SKImageSkiaSharp.SKPixmapSkiaSharp.SKSurface: All back-ends are supportedSkiaSharp.SKColorSkiaSharp.SKPMColorSkiaSharp.SKColorF
- KGy SOFT types:
KGySoft.Drawing.Imaging.IReadableBitmapDataKGySoft.Drawing.Imaging.Palette: Color entries can be examined individually.KGySoft.Drawing.Imaging.Color32KGySoft.Drawing.Imaging.PColor32KGySoft.Drawing.Imaging.Color64KGySoft.Drawing.Imaging.PColor64KGySoft.Drawing.Imaging.ColorFKGySoft.Drawing.Imaging.PColorF
Installing Debugger Visualizers
<details> <summary><strong>By VSIX Installer</strong><a id="by-vsix-installer"/></summary><p/>If you use Visual Studio 2013 or newer, then you can perform the install directly from Visual Studio by the Extensions/Manage Extensions (older Visual Studio versions: Tools/Extensions and Updates...) menu if you search for the "KGy SOFT Image DebuggerVisualizers" extension.
Alternatively, you can download the installer pack

