cgImage
TypeScriptget cgImage(): _CoreGraphics_CGImageSwift declarationvar cgImage: CGImage { get }The image as a Core Graphics image.
struct · iOS 27.0+ · SDK 27.1
struct ImageAttachmentAn image attachment in a transcript entry.
get cgImage(): _CoreGraphics_CGImageSwift declarationvar cgImage: CGImage { get }The image as a Core Graphics image.
get ciImage(): _CoreImage_CIImageSwift declarationvar ciImage: CIImage { get }get orientation(): _ImageIO_CGImagePropertyOrientationSwift declarationvar orientation: CGImagePropertyOrientation { get }The display orientation of the image.
pixelBuffer(resolution?: ({ width: number; height: number }) | null, pixelFormat?: (SDKHandle) | null): _CoreVideo_CVReadOnlyPixelBufferSwift declarationfunc pixelBuffer(resolution: CGSize? = nil, pixelFormat: OSType? = nil) throws -> CVReadOnlyPixelBufferReturns the image as a pixel buffer, optionally resampled to a given resolution and pixel format. - Parameters: - resolution: The desired resolution of the pixel buffer. Defaults to the image's original resolution. - pixelFormat: The pixel format of the pixel buffer. Defaults to `kCVPixelFormatType_32BGRA`.
get url(): (string) | nullSwift declarationvar url: URL? { get }The URL of the original image asset, if the attachment was created from a URL.
static initImageURLOrientation(imageURL: string, orientation?: (_ImageIO_CGImagePropertyOrientation) | null): Transcript_ImageAttachmentSwift declarationinit(imageURL: URL, orientation: CGImagePropertyOrientation? = nil)Creates an image attachment from a file URL pointing to an image.
static initOrientation(cgImage: _CoreGraphics_CGImage, orientation?: (_ImageIO_CGImagePropertyOrientation) | null): Transcript_ImageAttachmentSwift declarationinit(_ cgImage: CGImage, orientation: CGImagePropertyOrientation? = nil)Creates an image attachment from a Core Graphics image.
static initOrientation56194(pixelBuffer: _CoreVideo_CVBuffer, orientation?: (_ImageIO_CGImagePropertyOrientation) | null): Transcript_ImageAttachmentSwift declarationinit(_ pixelBuffer: CVPixelBuffer, orientation: CGImagePropertyOrientation? = nil)Creates an image attachment from a pixel buffer.
static initOrientation16012(ciImage: _CoreImage_CIImage, orientation?: (_ImageIO_CGImagePropertyOrientation) | null): Transcript_ImageAttachmentSwift declarationinit(_ ciImage: CIImage, orientation: CGImagePropertyOrientation? = nil)No declarations were skipped in this snapshot.