This function queries both data and associated metadata from a BNF image using specified parameters and return the information in a tidy data.frame

bi_all_data(
  identifier = NULL,
  region = c(0L, 0L, 500L, 500L),
  size = "full",
  rotation = 0,
  quality = c("native", "color", "gray", "bitonal"),
  format = c("jpg", "tif", "png", "gif", "jp2", "pdf")
)

Arguments

identifier

[character(1+)]
one or multiple identifier(s) of the document that begins with "ark:/"

region

[character(1) or integer(4)]
either "full" to retrieve the full image or a vector of four integers that defines the region to extract from the image. The vector has the form (x0, y0, w, h) with x0, y0 the coordinates of the top left point of the extracted region (with the origin at the top left of the image), w the width of the extracted region and h the height of the extracted region.

size

[character(1) or integer(2)]
either "full" to retrieve the full region or a vector of two integers that defines the size of the final image

rotation

[numeric(1)]
an integer that defines the rotation in degrees to apply to the final image (0 for no rotation)

quality

[character(1)]

  • "native" for native colors of the image or,

  • "color" for the image in color,

  • "gray" for levels of gray,

  • "bitonal" for only black and white pixels.

format

[character(1)]

  • "jpg" for JPEG image,

  • "tif" for TIFF image,

  • "png" for PNG image,

  • "gif" for GIF image,

  • "jp2" for JP2 image,

  • "pdf" for PDF image.

Value

a tibble with both the image and the metadata, with one row per identifier