Skip to contents

Build a tile-source descriptor for the canvas

Usage

at_tile_source(
  img,
  level_max = NULL,
  tile_size = 512L,
  embed = TRUE,
  view = NULL,
  call = rlang::caller_env()
)

Arguments

img

An annot_image.

level_max

Optional maximum level to expose; the image maximum by default.

tile_size

Tile size in pixels. Default 512.

embed

Logical; embed a downsampled base image as a data URI (for the self-contained canvas). Default TRUE.

view

Optional band view: a list with operation (see at_band_operations()), bands and params. NULL shows natural-colour RGB (nearest bands to 640/550/460 nm for spectral cubes). Display only.

call

The calling environment, for error reporting.

Value

A list describing the image for the widget: width, height, tileSize, minLevel, maxLevel, nBands, and (when embed) dataUri.