Zavolokas.GdiExtensions
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Zavolokas.GdiExtensions --version 1.0.0
NuGet\Install-Package Zavolokas.GdiExtensions -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="Zavolokas.GdiExtensions" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Zavolokas.GdiExtensions --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Zavolokas.GdiExtensions, 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.
// Install Zavolokas.GdiExtensions as a Cake Addin
#addin nuget:?package=Zavolokas.GdiExtensions&version=1.0.0
// Install Zavolokas.GdiExtensions as a Cake Tool
#tool nuget:?package=Zavolokas.GdiExtensions&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GDI+ Extensions
Contains extension methods to deal with Image
classes.
Contents
Scaling
Clones an original image to a new one with changed size.
using (var bitmap = new Bitmap(pathToImageFile))
using (var scaled = bitmap.CloneWithScaleTo(300, 80))
{
scaled
.SaveTo(resultPath, ImageFormat.Png)
.ShowFile();
}
Input image | Result |
---|---|
Opacity
Clones an original image to a new one with the opacity set to the specidied.
using (var image = new Bitmap(pathToImageFile))
using (var semiTransparent = image.CloneWithOpacity(0.3f))
{
semiTransparent
.SaveTo(resultPath, ImageFormat.Png)
.ShowFile();
}
Input image | Result |
---|---|
Channels copy
Replaces channel values from a source RGBA image.
Note: The dest and source images should be of the same size.
using (var source = new Bitmap(pathToSrcImage))
using (var dest = new Bitmap(pathToDestImage))
{
const int dstChannelIndex = 2;
const int srcChannelIndex = 3;
dest.CopyChannel(dstChannelIndex, source, srcChannelIndex)
.SaveTo(resultPath, ImageFormat.Png)
.ShowFile();
}
Dest | Src |
---|---|
Replace Red with Alpha | Replace Green with Alpha | Replace Blue with Alpha |
---|---|---|
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Zavolokas.GdiExtensions:
Package | Downloads |
---|---|
Zavolokas.SeamCarving
Package Description |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Zavolokas.GdiExtensions:
Repository | Stars |
---|---|
zavolokas/Inpainting
Want to remove something(someone) from a photo as it never was there? This is .NET implementation of content-aware fill. It smartly fills in unwanted or missing areas of photographs.
|
|
zavolokas/SeamCarving
Image processing method that allows to remove an object from a photo.
|