ImageInfo(Image) Constructor

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

Definition

Namespace: GleamTech.ImageUltimate
Assembly: GleamTech.ImageUltimate (in GleamTech.ImageUltimate.dll) Version: 7.4.0
C#
public ImageInfo(
	Image bitmap
)

Parameters

bitmap  Image
The Image instance containing the image to load.

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