Table of Contents

Class CGImage

Namespace
CarinaStudio.MacOS.CoreGraphics
Assembly
CarinaStudio.AppBase.MacOS.dll

CGImage.

public class CGImage : CFObject, IShareableDisposable<CFObject>, IDisposable
Inheritance
CGImage
Implements
Inherited Members
Extension Methods

Constructors

CGImage(CGImage)

Initialize new CGImage instance.

public CGImage(CGImage source)

Parameters

source CGImage

Source image to copy.

CGImage(CGImage, CGColorSpace)

Initialize new CGImage instance.

public CGImage(CGImage source, CGColorSpace colorSpace)

Parameters

source CGImage

Source image to copy.

colorSpace CGColorSpace

Color space.

CGImage(int, int, CGColorSpace)

Initialize new empty CGImage instance with Packed pixel format and 8-bit component.

public CGImage(int width, int height, CGColorSpace colorSpace)

Parameters

width int

Width in pixels.

height int

Height in pixels.

colorSpace CGColorSpace

Color space.

CGImage(int, int, CGImagePixelFormatInfo, int, CGImageByteOrderInfo, int, CGImageAlphaInfo, CGColorSpace, CGColorRenderingIntent)

Initialize new empty CGImage instance.

public CGImage(int width, int height, CGImagePixelFormatInfo pixelFormat, int bitsPerComponent, CGImageByteOrderInfo byteOrder, int bytesPerRow, CGImageAlphaInfo alphaInfo, CGColorSpace colorSpace, CGColorRenderingIntent renderingIntent = CGColorRenderingIntent.Default)

Parameters

width int

Width in pixels.

height int

Height in pixels.

pixelFormat CGImagePixelFormatInfo

Pixel format.

bitsPerComponent int

Bits per component.

byteOrder CGImageByteOrderInfo

Byte order.

bytesPerRow int

Bytes per row.

alphaInfo CGImageAlphaInfo

Alpha info.

colorSpace CGColorSpace

Color space.

renderingIntent CGColorRenderingIntent

Rendering intent.

CGImage(int, int, CGImagePixelFormatInfo, int, CGImageByteOrderInfo, int, CGImageAlphaInfo, CGDataProvider, CGColorSpace, CGColorRenderingIntent)

Initialize new CGImage instance.

public CGImage(int width, int height, CGImagePixelFormatInfo pixelFormat, int bitsPerComponent, CGImageByteOrderInfo byteOrder, int bytesPerRow, CGImageAlphaInfo alphaInfo, CGDataProvider dataProvider, CGColorSpace colorSpace, CGColorRenderingIntent renderingIntent = CGColorRenderingIntent.Default)

Parameters

width int

Width in pixels.

height int

Height in pixels.

pixelFormat CGImagePixelFormatInfo

Pixel format.

bitsPerComponent int

Bits per component.

byteOrder CGImageByteOrderInfo

Byte order.

bytesPerRow int

Bytes per row.

alphaInfo CGImageAlphaInfo

Alpha info.

dataProvider CGDataProvider

Provider of data of image.

colorSpace CGColorSpace

Color space.

renderingIntent CGColorRenderingIntent

Rendering intent.

Properties

AlphaInfo

Get alpha information of image.

public CGImageAlphaInfo AlphaInfo { get; }

Property Value

CGImageAlphaInfo

BitsPerPixel

Get number of bits for each pixel.

public int BitsPerPixel { get; }

Property Value

int

ByteOrder

Get byte order.

public CGImageByteOrderInfo ByteOrder { get; }

Property Value

CGImageByteOrderInfo

BytesPerRow

Get number of bytes for each row of image.

public int BytesPerRow { get; }

Property Value

int

ColorSpace

Get color space of image.

public CGColorSpace? ColorSpace { get; }

Property Value

CGColorSpace

DataProvider

Get CGDataProvider to access data of image.

public CGDataProvider DataProvider { get; }

Property Value

CGDataProvider

Height

Get height of image in pixels.

public int Height { get; }

Property Value

int

PixelFormat

Get pixel format.

public CGImagePixelFormatInfo PixelFormat { get; }

Property Value

CGImagePixelFormatInfo

Width

Get width of image in pixels.

public int Width { get; }

Property Value

int

Methods

FromData(CFData)

Create CGImage from data.

public static CGImage FromData(CFData data)

Parameters

data CFData

Data.

Returns

CGImage

CGImage.

FromFile(string)

Create CGImage from file.

public static CGImage FromFile(string fileName)

Parameters

fileName string

File name.

Returns

CGImage

CGImage.

FromStream(Stream)

Create CGImage from data.

public static CGImage FromStream(Stream stream)

Parameters

stream Stream

Stream.

Returns

CGImage

CGImage.

OnRelease()

Called when releasing instance.

public override void OnRelease()