ImageType

ceramic.ImageType (Abstract)

Supported image file formats for loading and exporting images.

ImageType represents the different image formats that Ceramic can work with. These formats are used when loading image assets, exporting render textures, or specifying expected file types for image operations.

The enum is implemented as an abstract over String, allowing:

  • Direct string conversion for file extensions
  • Type-safe image format specification
  • Easy integration with file system operations
// Loading images with specific types
var texture = app.assets.texture('logo.png');

// Exporting render texture
renderTexture.exportToFile('screenshot.png', PNG);

// Checking file type
var extension = Path.extension(filename);
var imageType:ImageType = extension; // Auto-converts from string
See: ImageAsset For loading image files, RenderTexture.exportToFile For saving images, Texture The loaded image representation

Type Conversions

From:

  • [String](/api-docs/clay-native/String/)

To:

  • [String](/api-docs/clay-native/String/)

Metadata

Name Parameters
:enum -