ImageTask(Image, Boolean, ImageUltimateConfiguration) Constructor

Initializes a new instance of the ImageTask class from the specified Image.

Definition

Namespace: GleamTech.ImageUltimate
Assembly: GleamTech.ImageUltimate (in GleamTech.ImageUltimate.dll) Version: 7.4.0
C#
public ImageTask(
	Image image,
	bool enableUndo = false,
	ImageUltimateConfiguration configuration = null
)

Parameters

image  Image
The Image instance containing the image to load.
enableUndo  Boolean  (Optional)
If you need to use Undo and UndoAll commands, this parameter should be set to true.
configuration  ImageUltimateConfiguration  (Optional)
The configuration to use instead of the global configuration.

Example

Casting from/to System.Drawing.Bitmap and System.Drawing.Image:

C#
var gleamTechImage = new GleamTech.Drawing.Image("Test.png");
var systemBitmap = new System.Drawing.Bitmap("Test.bmp");
var systemImage = System.Drawing.Image.FromFile("Test.jpg");

//Casting from System.Drawing.Bitmap:
gleamTechImage = systemBitmap.ToGleamTechImage();

//Casting to System.Drawing.Bitmap:
systemBitmap = gleamTechImage.ToSystemBitmap();

//---------------------------------------

//Casting from System.Drawing.Image:
gleamTechImage = systemImage.ToGleamTechImage();

//Casting to System.Drawing.Image:
systemImage = gleamTechImage.ToSystemImage();

Casting from/to SixLabors.ImageSharp.Image:

C#
var gleamTechImage = new GleamTech.Drawing.Image("Test.png");
var imageSharpImage = SixLabors.ImageSharp.Image.Load("Test.jpg");

//Casting from SixLabors.ImageSharp.Image:
gleamTechImage = imageSharpImage.ToGleamTechImage();

//Casting to SixLabors.ImageSharp.Image:
imageSharpImage = gleamTechImage.ToImageSharpImage();

Casting from/to SkiaSharp.SKBitmap and SkiaSharp.SKImage:

C#
var gleamTechImage = new GleamTech.Drawing.Image("Test.png");
var skiaBitmap = SkiaSharp.SKBitmap.Decode("Test.bmp");
var skiaImage = SkiaSharp.SKImage.FromBitmap(skiaBitmap);

//Casting from SkiaSharp.SKBitmap:
gleamTechImage = skiaBitmap.ToGleamTechImage();

//Casting to SkiaSharp.SKBitmap:
skiaBitmap = gleamTechImage.ToSkiaBitmap();

//---------------------------------------

//Casting from SkiaSharp.SKImage:
gleamTechImage = skiaImage.ToGleamTechImage();

//Casting to SkiaSharp.SKImage:
skiaImage = gleamTechImage.ToSkiaImage();

Casting from/to Microsoft.Maui.Graphics.Platform.PlatformImage:

C#
var gleamTechImage = new GleamTech.Drawing.Image("Test.png");
var mauiImage = new Microsoft.Maui.Graphics.Platform.PlatformImage(imageBytes);

//Casting from Microsoft.Maui.Graphics.Platform.PlatformImage:
gleamTechImage = mauiImage.ToGleamTechImage();

//Casting to Microsoft.Maui.Graphics.Platform.PlatformImage:
mauiImage = gleamTechImage.ToMauiImage();

See Also