API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classImageFactory

@codexo/exojs / resources / stable

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.

1
props
5
methods
0
events
Import
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.

Constructors 1
new(): ImageFactory
Methods 5
create(source: ArrayBuffer, options: ImageFactoryOptions): Promise<DecodedImage>
createObjectUrl(blob: Blob): string
destroy(): void
process(response: Response): Promise<ArrayBuffer>
revokeObjectUrl(objectUrl: string): void
Properties 1
storageName: "image"
Source