One Logo Pool Ball
FoundationModels · IOS API REFERENCE

Transcript.ImageAttachment

struct · iOS 27.0+ · SDK 27.1

struct ImageAttachment

An image attachment in a transcript entry.

Members (9)

get · iOS 27.0+

cgImage

TypeScript
get cgImage(): _CoreGraphics_CGImage
Swift declaration
var cgImage: CGImage { get }

The image as a Core Graphics image.

get · iOS 27.0+

ciImage

TypeScript
get ciImage(): _CoreImage_CIImage
Swift declaration
var ciImage: CIImage { get }
get · iOS 27.0+

orientation

TypeScript
get orientation(): _ImageIO_CGImagePropertyOrientation
Swift declaration
var orientation: CGImagePropertyOrientation { get }

The display orientation of the image.

method · iOS 27.0+

pixelBuffer

TypeScript
pixelBuffer(resolution?: ({ width: number; height: number }) | null, pixelFormat?: (SDKHandle) | null): _CoreVideo_CVReadOnlyPixelBuffer
Swift declaration
func pixelBuffer(resolution: CGSize? = nil, pixelFormat: OSType? = nil) throws -> CVReadOnlyPixelBuffer

Returns 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 · iOS 27.0+

url

TypeScript
get url(): (string) | null
Swift declaration
var url: URL? { get }

The URL of the original image asset, if the attachment was created from a URL.

init · iOS 27.0+

init

TypeScript
static initImageURLOrientation(imageURL: string, orientation?: (_ImageIO_CGImagePropertyOrientation) | null): Transcript_ImageAttachment
Swift declaration
init(imageURL: URL, orientation: CGImagePropertyOrientation? = nil)

Creates an image attachment from a file URL pointing to an image.

init · iOS 27.0+

init

TypeScript
static initOrientation(cgImage: _CoreGraphics_CGImage, orientation?: (_ImageIO_CGImagePropertyOrientation) | null): Transcript_ImageAttachment
Swift declaration
init(_ cgImage: CGImage, orientation: CGImagePropertyOrientation? = nil)

Creates an image attachment from a Core Graphics image.

init · iOS 27.0+

init

TypeScript
static initOrientation56194(pixelBuffer: _CoreVideo_CVBuffer, orientation?: (_ImageIO_CGImagePropertyOrientation) | null): Transcript_ImageAttachment
Swift declaration
init(_ pixelBuffer: CVPixelBuffer, orientation: CGImagePropertyOrientation? = nil)

Creates an image attachment from a pixel buffer.

init · iOS 27.0+

init

TypeScript
static initOrientation16012(ciImage: _CoreImage_CIImage, orientation?: (_ImageIO_CGImagePropertyOrientation) | null): Transcript_ImageAttachment
Swift declaration
init(_ ciImage: CIImage, orientation: CGImagePropertyOrientation? = nil)

Skipped declarations

No declarations were skipped in this snapshot.

All FoundationModels types →