Share via


CGImage Class

Definition

Represents bitmap images and bitmap masks.

public class CGImage : CoreFoundation.NativeObject
type CGImage = class
    inherit NativeObject
Inheritance

Constructors

Name Description
CGImage(Int32, Int32, Int32, Int32, Int32, CGColorSpace, CGBitmapFlags, CGDataProvider, NFloat[], Boolean, CGColorRenderingIntent)
CGImage(Int32, Int32, Int32, Int32, Int32, CGColorSpace, CGImageAlphaInfo, CGDataProvider, NFloat[], Boolean, CGColorRenderingIntent)
CGImage(Single, Int32, Int32, Int32, Int32, Int32, CGColorSpace, CGBitmapFlags, CGDataProvider, NFloat[], Boolean, CGColorRenderingIntent)

Create a new CGImage instance with the specified content headroom.

Properties

Name Description
AlphaInfo

The bitmap configuration.

BitmapInfo

The bitmap configuration.

BitsPerComponent

Bits per component

BitsPerPixel

The number of bits per pixel.

ByteOrderInfo
BytesPerRow

The number of bytes per row in the image.

CalculatedContentAverageLightLevel

Get the calculated content average light level.

CalculatedContentHeadroom

Get the calculated the content headroom.

ColorSpace

The image colorspace.

ContainsImageSpecificToneMappingMetadata

Get whether this image has image-specific tone mapping metadata.

ContentAverageLightLevel

Get the content average light level.

ContentHeadroom

Get the content headroom for this image.

DataProvider

Returns the image's data provider.

Decode

Returns an array of values that consist of upper and lower limits, into which the corresponding image pixel data are linearly interpolated for decoding.

DefaultHdrImageContentHeadroom

Get the default content headroom for HDR images.

Handle (Inherited from DisposableObject)
Height

The image height in pixels.

IsMask

Whether this image is a mask or a bitmap.

Owns (Inherited from DisposableObject)
PixelFormatInfo
RenderingIntent

The rendering intent.

ScreenImage

Takes a screenshot.

ShouldInterpolate

Whether interpolation is enabled for this image.

ShouldToneMap

Get whether this image should be tone mapped when rendered.

UTType

Gets the image's universal type identifier.

Width

The image width in pixels.

Methods

Name Description
ClearHandle() (Inherited from DisposableObject)
Clone()

Makes a copy of the image.

Copy(Single)

Create a copy of the current image, adding or replacing the current image's headroom.

CopyWithCalculatedHdrStats()

Create a copy of this image, adding or replacing the calculated HDR stats.

CopyWithContentAverageLightLevel(Single)

Create a copy of this image, adding or replacing the content average light level.

CreateMask(Int32, Int32, Int32, Int32, Int32, CGDataProvider, NFloat[], Boolean)
Dispose() (Inherited from DisposableObject)
Dispose(Boolean) (Inherited from NativeObject)
Equals(Object) (Inherited from DisposableObject)
FromJPEG(CGDataProvider, NFloat[], Boolean, CGColorRenderingIntent)
FromPNG(CGDataProvider, NFloat[], Boolean, CGColorRenderingIntent)
GetCheckedHandle() (Inherited from DisposableObject)
GetHashCode() (Inherited from DisposableObject)
InitializeHandle(NativeHandle) (Inherited from DisposableObject)
Release()
Retain()
ScreenImage(Int32, CGRect, CGWindowListOption, CGWindowImageOption)
ScreenImage(Int32, CGRect)
WithColorSpace(CGColorSpace)

Creates a copy of the image based on the specified colorspace.

WithImageInRect(CGRect)

Creates a new image with the dimensions specified in the rectangle

WithMask(CGImage)

Creates a new image that has been masked with the specified mask.

WithMaskingColors(NFloat[])

Extension Methods

Name Description
GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)

Applies to