extractPageThumbnail method

Future<Uint8List?> extractPageThumbnail(
  1. String href,
  2. int maxHeight,
  3. int quality
)

Extracts a downscaled JPEG thumbnail of a publication resource.

href is the resource href as it appears in Publication.readingOrder or Publication.tableOfContents. maxHeight caps the longest side of the output image in pixels. quality is the JPEG quality (0-100).

Returns null if the publication is closed, the href cannot be resolved, or the resource cannot be decoded as an image.

Implementation

Future<Uint8List?> extractPageThumbnail(
  String href,
  int maxHeight,
  int quality,
) => throw UnimplementedError(
  'extractPageThumbnail() has not been implemented.',
);