ResourceFactory

smile.infrastructure.ResourceFactory
See theResourceFactory companion object
trait ResourceFactory[Buffer]

Provides functionalities for creating and saving images from various sources.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

Creates an AnimatedPicture from a GIF image located at the specified path.

Creates an AnimatedPicture from a GIF image located at the specified path.

Value parameters

path

The path to the GIF image, which can be a local filesystem path, a resource path, or an internet URL.

Attributes

Returns

An AnimatedPicture instance representing the animated GIF.

Throws
java.io.IOException

if the image at the specified path cannot be found or loaded or if no suitable GIF image reader is available.

def bufferAdapterFromPath(path: String): BufferAdapter[Buffer]

Creates a BufferAdapter from an image located at a given path. This method can load images from local file paths, resources within the application's classpath, and URIs, including those on the internet. If the path is a URL to an image on the internet, the method will attempt to download and load the image.

Creates a BufferAdapter from an image located at a given path. This method can load images from local file paths, resources within the application's classpath, and URIs, including those on the internet. If the path is a URL to an image on the internet, the method will attempt to download and load the image.

Value parameters

path

The path to the image. It can be a local filesystem path, a resource path, or a URL to an image on the internet.

Attributes

Returns

A BufferAdapter containing the image loaded from the specified path.