Public declaration syntax from forge-ts/packages/forge-media/src/image.ts Original source SHA-256: 392397e64374a3219161aeb6442bb56dd25a3fd101ca0c6a488d9d7d01684110 Function bodies and constant values are omitted. This is not the complete implementation. Source line 18 export const ImageFormat /* type inferred in source */; Source line 25 export type ImageFormat = (typeof ImageFormat)[keyof typeof ImageFormat]; Source line 33 export function imageMimeType(format: ImageFormat): string; Source line 47 export function imageExtension(format: ImageFormat): string; Source line 54 export interface ImageOptions { /** Image width in pixels. */ readonly width?: number; /** Image height in pixels. */ readonly height?: number; /** Output format. Defaults to PNG. */ readonly format?: ImageFormat; /** Quality level (0-100). Only applies to JPEG and WebP. */ readonly quality?: number; /** Style hint for the generator (e.g., 'vivid', 'natural'). */ readonly style?: string; } Source line 70 export interface ImageResult { /** The raw image data as a Uint8Array. */ readonly data: Uint8Array; /** The MIME type of the generated image. */ readonly mimeType: string; /** The width of the generated image in pixels. */ readonly width: number; /** The height of the generated image in pixels. */ readonly height: number; /** The model identifier that produced this image. */ readonly model: string; } Source line 100 export interface ImageProvider { /** Returns the model identifier. */ modelId(): string; /** Returns the provider name (e.g., 'openai', 'stability'). */ providerName(): string; /** * Generates an image from a text prompt. * * @param prompt - The text description of the desired image. * @param options - Optional generation parameters. * @returns The generated image result. * @throws {ForgeMediaError} If generation fails. */ generateImage(prompt: string, options?: ImageOptions): Promise; } Source line 138 export async function generateImage( provider: ImageProvider, prompt: string, options?: ImageOptions ): Promise;