Table of Contents

Class GeoImage

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll
public class GeoImage : IDisposable
Inheritance
GeoImage
Implements
Inherited Members

Constructors

GeoImage()

Initializes a new instance of the GeoImage class.

public GeoImage()
See Also

GeoImage(SKBitmap)

Initializes a new instance of the GeoImage class.

public GeoImage(SKBitmap skBitmap)

Parameters

skBitmap SKBitmap

A SKBitmap object, it's an cross-platform bitmap object from SKIA-Sharp

See Also

GeoImage(byte[])

Initializes a new instance of the GeoImage class.

public GeoImage(byte[] bytes)

Parameters

bytes byte[]

The bytes.

See Also

GeoImage(Stream)

Initializes a new instance of the GeoImage class.

public GeoImage(Stream stream)

Parameters

stream Stream

The stream.

See Also

GeoImage(int, int)

Initializes a new instance of the GeoImage class.

public GeoImage(int width, int height)

Parameters

width int

The width.

height int

The height.

See Also

GeoImage(string)

Initializes a new instance of the GeoImage class.

public GeoImage(string pathFilename)

Parameters

pathFilename string

The path filename.

See Also

Properties

Height

Gets the height.

public int Height { get; }

Property Value

int

The height.

See Also

NativeImage

public SKBitmap NativeImage { get; }

Property Value

SKBitmap
See Also

Opacity

Gets or sets the opacity.

public float Opacity { get; set; }

Property Value

float

The opacity.

See Also

PathFilename

Gets the path filename.

public string PathFilename { get; }

Property Value

string

The path filename.

See Also

Width

Gets the width.

public int Width { get; }

Property Value

int

The width.

See Also

Methods

Clear(GeoColor)

Clears the specified color.

public void Clear(GeoColor color)

Parameters

color GeoColor

The color.

See Also

Clip(DrawingRectangle, int, int)

public GeoImage Clip(DrawingRectangle clippingRectangle, int clippingWidth, int clippingHeight)

Parameters

clippingRectangle DrawingRectangle
clippingWidth int
clippingHeight int

Returns

GeoImage
See Also

CreateCustomizedImage(int, int, GeoColorType, GeoAlphaType)

Creates the customized image.

public static GeoImage CreateCustomizedImage(int width, int height, GeoColorType colorType, GeoAlphaType alphaType)

Parameters

width int

The width.

height int

The height.

colorType GeoColorType

Type of the color.

alphaType GeoAlphaType

Type of the alpha.

Returns

GeoImage
See Also

Crop(DrawingRectangle)

Cuts the specified source rect.

public GeoImage Crop(DrawingRectangle srcRect)

Parameters

srcRect DrawingRectangle

The source rect.

Returns

GeoImage
See Also

Dispose()

This method implements the IDispose method. This method is the concrete wrapper for the abstract method DisposeCore.

public void Dispose()
See Also

Dispose(bool)

This method disposes all the unmanaged resource in the tile.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Remarks

When implementing this method, consider the stop the background threading when drawing asynchronously.

See Also

DrawImage(GeoImage, float, float)

Combines the images.

public void DrawImage(GeoImage geoImage, float pointX, float pointY)

Parameters

geoImage GeoImage
pointX float
pointY float
See Also

DrawText(string, GeoFont, GeoBrush, ScreenPointF[])

Appends the text.

public void DrawText(string text, GeoFont font, GeoBrush fillBrush, ScreenPointF[] points)

Parameters

text string

The text.

font GeoFont

The font.

fillBrush GeoBrush

The fill brush.

points ScreenPointF[]

The points.

See Also

~GeoImage()

Finalizer of this tile object.

protected ~GeoImage()
See Also

GetImageBytes(GeoImageFormat, int)

Gets the image bytes.

public byte[] GetImageBytes(GeoImageFormat imageFormat = GeoImageFormat.Png, int imageQuality = 80)

Parameters

imageFormat GeoImageFormat

The image format.

imageQuality int

The image quality.

Returns

byte[]
See Also

GetImageStream(GeoImageFormat, int)

Gets the image stream.

public Stream GetImageStream(GeoImageFormat imageFormat = GeoImageFormat.Png, int imageQuality = 80)

Parameters

imageFormat GeoImageFormat

The image format.

imageQuality int

The image quality.

Returns

Stream
See Also

GetIntPtr()

Gets the pixels.

public nint GetIntPtr()

Returns

nint
See Also

Save(Stream, GeoImageFormat, int)

Saves the specified stream.

public void Save(Stream stream, GeoImageFormat imageFormat, int quality = 80)

Parameters

stream Stream

The stream.

imageFormat GeoImageFormat

The image format.

quality int

The quality.

See Also

Save(string, GeoImageFormat, int)

Saves the specified file path.

public void Save(string filePath, GeoImageFormat imageFormat = GeoImageFormat.Png, int quality = 80)

Parameters

filePath string

The file path.

imageFormat GeoImageFormat

The image format.

quality int

The quality.

See Also

Scale(int, int)

Scales the specified width.

public GeoImage Scale(int targetWidth, int targetHeight)

Parameters

targetWidth int

The width.

targetHeight int

The height.

Returns

GeoImage
See Also

SetPixels(GeoColor[])

Sets the pixels.

public void SetPixels(GeoColor[] pixels)

Parameters

pixels GeoColor[]

The pixels.

See Also

See Also