Skip to contents

Build a tile-source descriptor for the canvas

Usage

at_tile_source(
  img,
  level_max = NULL,
  tile_size = 512L,
  embed = TRUE,
  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.

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.