API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classImageFactory
AssetFactory implementation that loads PNG, JPG, WebP, AVIF, and other browser-supported raster image formats and produces a decoded image. When `createImageBitmap` is available (all modern browsers) the factory returns an ImageBitmap — a zero-copy GPU-upload path that avoids the HTMLImageElement render-pipeline overhead. On older environments it falls back to an HTMLImageElement. MIME type detection is performed automatically from the buffer's magic bytes; pass an explicit `mimeType` in options to override.
import { ImageFactory } from '@codexo/exojs' AssetFactory implementation that loads PNG, JPG, WebP, AVIF, and other browser-supported raster image formats and produces a decoded image.
When `createImageBitmap` is available (all modern browsers) the factory returns an ImageBitmap — a zero-copy GPU-upload path that avoids the HTMLImageElement render-pipeline overhead. On older environments it falls back to an HTMLImageElement.
MIME type detection is performed automatically from the buffer's magic bytes; pass an explicit `mimeType` in options to override.
new(): ImageFactory create(source: ArrayBuffer, options: ImageFactoryOptions): Promise<DecodedImage> createObjectUrl(blob: Blob): string destroy(): void process(response: Response): Promise<ArrayBuffer> revokeObjectUrl(objectUrl: string): void storageName: "image"