ImageSource

actual open class ImageSource : AbstractSource

Provides a mechanism for specifying images from a variety of sources. ImageSource retains the image source on behalf of the caller, making this information available to WorldWind components that load images on the caller's behalf.
ImageSource supports following source types:

  • Uniform Resource Locator URL

  • Local image File

  • Android Bitmap

  • WorldWind ImageSource.ImageFactory

  • Android resource identifier

  • Multi-platform resource identifier
    ImageSource instances are intended to be used as a key into a cache or other data structure that enables sharing of loaded images. Android bitmaps and WorldWind bitmap factories are compared by reference. Android resource identifiers with equivalent IDs are considered equivalent. File paths and URLs with the same string representation considered equals.

actual open class ImageSource : AbstractSource

iOS ImageSource. Mirrors the JS / JVM shape: an AbstractSource holding either an ImageResource, a URL string, an arbitrary Any, or an ImageFactory subclass.

The platform extension on ImageFactory is suspend fun createImage(): UIImage? — apps subclass this to render shapes lazily (e.g. line stipple, custom procedural icons).

actual open class ImageSource : AbstractSource

Provides a mechanism for specifying images from a variety of sources. ImageSource retains the image source on behalf of the caller, making this information available to WorldWind components that load images on the caller's behalf.
ImageSource supports following source types:

  • Uniform Resource Locator URL

  • Local image File

  • BufferedImage object

  • WorldWind ImageSource.ImageFactory

  • Multi-platform resource identifier
    ImageSource instances are intended to be used as a key into a cache or other data structure that enables sharing of loaded images. BufferedImages and WorldWind image factories are compared by reference. File paths and URLs with the same string representation considered equals.

actual open class ImageSource : AbstractSource

Provides a mechanism for specifying images from a variety of sources. ImageSource retains the image source on behalf of the caller, making this information available to WorldWind components that load images on the caller's behalf.
ImageSource supports following source types:

  • Uniform Resource Locator URL

  • Image object

  • WorldWind ImageSource.ImageFactory

  • Multi-platform resource identifier
    ImageSource instances are intended to be used as a key into a cache or other data structure that enables sharing of loaded images. Images are compared by reference. URLs with the same string representation considered equals.

Types

Link copied to clipboard
actual object Companion
expect object Companion
actual object Companion
actual object Companion
actual object Companion
Link copied to clipboard
actual interface ImageFactory

Factory for delegating construction of bitmap images. WorldWind shapes configured with a ImageFactory construct their bitmaps lazily, typically when the shape becomes visible on screen.

expect interface ImageFactory

Factory for delegating construction of images. WorldWind shapes configured with a ImageFactory construct their images lazily, typically when the shape becomes visible on screen.

actual interface ImageFactory

Factory for delegating construction of images. iOS variant returns UIImage? so the existing ImageDecoder.decodeUIImage pipeline can convert it into RGBA bytes for GL upload. Apps that need raw bytes should still wrap into a UIImage (cheap on iOS).

actual interface ImageFactory

Factory for delegating construction of images. WorldWind shapes configured with a ImageFactory construct their images lazily, typically when the shape becomes visible on screen.

actual interface ImageFactory

Factory for delegating construction of images. WorldWind shapes configured with a ImageFactory construct their images lazily, typically when the shape becomes visible on screen.

NetworkBoundImageFactory
Link copied to clipboard

An ImageFactory whose bytes may come from a local cache OR the network. The render resource cache decodes it in two phases: createCachedBitmap on the local-retrieval lane (cache-only, null on a miss) then createBitmap on the remote lane only on a miss — keeping slow network fetches off the lane shared with placemark icons and cache-hit tiles.

An ImageFactory whose bytes may come from a local cache OR the network. The render resource cache decodes it in two phases: createCachedImage on the local-retrieval lane (cache-only, null on a miss) then createImage on the remote lane only on a miss — keeping slow network fetches off the lane shared with placemark icons and cache-hit tiles.

An ImageFactory whose bytes may come from a local cache OR the network. The render resource cache decodes it in two phases: createCachedImage on the local-retrieval lane (cache-only, null on a miss) then createImage on the remote lane only on a miss — keeping slow network fetches off the lane shared with placemark icons and cache-hit tiles.

An ImageFactory whose bytes may come from a local cache OR the network. The render resource cache decodes it in two phases: createCachedImage on the local-retrieval lane (cache-only, null on a miss) then createImage on the remote lane only on a miss — keeping slow network fetches off the lane shared with placemark icons and cache-hit tiles.

Properties

Link copied to clipboard

Indicates whether this image source is a Bitmap.

isFile
Link copied to clipboard

Indicates whether this image source is a File.

Indicates whether this image source is a File.

isImage
Link copied to clipboard

Indicates whether this image source is a BufferedImage.

Indicates whether this image source is a TexImageSource.

isImageFactory
Link copied to clipboard

Indicates whether this image source is a bitmap factory.

Indicates whether this image source is an image factory.

Indicates whether this image source is an image factory.

isResource
Link copied to clipboard

Indicates whether this image source is an Android or multi-platform resource.

Indicates whether this image source is a multi-platform resource.

Indicates whether this image source is a multi-platform resource.

Link copied to clipboard
isUrl
Link copied to clipboard

Indicates whether this image source is an URL.

Indicates whether this image source is an URL.

Indicates whether this image source is an URL string.

isZipEntry
Link copied to clipboard

Indicates whether this image source is a ZipEntryImageRef (a texture inside an open archive).

Indicates whether this image source is a ZipEntryImageRef (a texture inside an open archive).

postprocessor
Link copied to clipboard
var postprocessor: ResourcePostprocessor?

Resource post-processing routine.

Resource post-processing routine.

var postprocessor: ResourcePostprocessor?

Resource post-processing routine.

var postprocessor: ResourcePostprocessor?

Resource post-processing routine.

var postprocessor: ResourcePostprocessor?

Resource post-processing routine.

Functions

Link copied to clipboard
asFile
Link copied to clipboard
fun asFile(): File
fun asFile(): File
asImage
Link copied to clipboard
fun asImage(): TexImageSource
asResource
Link copied to clipboard
fun asResource(): ImageResource
fun asResource(): ImageResource
fun asResource(): ImageResource
Link copied to clipboard
fun asUIImage(): UIImage
asUnrecognized
Link copied to clipboard
asUrl
Link copied to clipboard
fun asUrl(): URL
fun asUrl(): String
fun asUrl(): URL
fun asUrl(): String
asZipEntry
Link copied to clipboard
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String