Static
canvasAsynchronously convert a canvas element to base64.
Optional
type: stringOptional
quality: numberThe base64 string of the canvas.
Static
compositeComposite a canvas object by rendering it to a single texture
The object to render to a texture
Optional
options: { center?: boolean; height?: number; tx?: number; ty?: number; width?: number } = {}Options which configure the resulting texture
Optional
center?: booleanCenter the texture in the rendered frame?
Optional
height?: numberThe desired height of the output texture
Optional
tx?: numberA horizontal translation to apply to the object
Optional
ty?: numberA vertical translation to apply to the object
Optional
width?: numberThe desired width of the output texture
The composite Texture object
Static
createCreate thumbnail preview for a provided image path.
The URL or display object of the texture to render to a thumbnail
Additional named options passed to the compositeCanvasTexture function
Optional
center?: booleanWhether to center the object within the thumbnail
Optional
format?: stringThe desired output image format
Optional
height?: numberThe desired height of the resulting thumbnail
Optional
quality?: numberThe desired output image quality
Optional
tx?: numberA horizontal transformation to apply to the provided source
Optional
ty?: numberA vertical transformation to apply to the provided source
Optional
width?: numberThe desired width of the resulting thumbnail
The parsed and converted thumbnail data
Static
hasTest whether a source file has a supported image extension type
A requested image source path
Does the filename end with a valid image extension?
Static
pixelsCreate a canvas element containing the pixel data.
Buffer used to create the image data.
Buffered image width.
Buffered image height.
Optional
eh?: numberSpecified height for the element (default to buffer image height).
Optional
element?: HTMLCanvasElementThe element to use.
Optional
ew?: numberSpecified width for the element (default to buffer image width).
Static
pixiAsynchronously convert a DisplayObject container to base64 using Canvas#toBlob and FileReader
A PIXI display object to convert
The requested mime type of the output, default is image/png
A number between 0 and 1 for image quality if image/jpeg or image/webp
A processed base64 string
Static
textureExtract a texture to a base64 PNG string
The texture object to extract
Optional
format?: stringImage format, e.g. "image/jpeg" or "image/webp".
Optional
quality?: numberJPEG or WEBP compression from 0 to 1. Default is 0.92.
A base64 png string of the texture
Static
uploadUpload a base64 image string to a persisted data storage location
The base64 string
The file name to upload
The file path where the file should be uploaded
Optional
options: { notify?: boolean; storage?: string; type?: string } = {}Additional options which affect uploading
Optional
notify?: booleanDisplay a UI notification when the upload is processed.
Optional
storage?: stringThe data storage location to which the file should be uploaded
Optional
type?: stringThe MIME type of the file being uploaded
A promise which resolves to the FilePicker upload response
A helper class to provide common functionality for working with Image objects.