Height of the tile.
ReadonlymimeReturns the MIME type of the encoded tile image.
Width of the tile.
Returns the tile as a Blob.
Formats not natively supported by browsers (such as TIFF or JPEG 2000) are automatically converted to PNG.
Note: The Tile::mime_type() method returns the original image format,
which may differ from the MIME type of the Blob returned here.
This method requires the wasm-web feature.
# #[cfg(feature= "wasm-web")]
# {
# use eozin::wasm::web::DynamicDecoder;
# use web_sys::Blob;
# async fn main() {
# let decoder = DynamicDecoder::with_blob(Blob::new().unwrap()).await.unwrap();
# let tile = decoder.read_tile(0, 0, 0).await.unwrap();
assert!(tile.is_jpeg2000());
let blob = tile.to_blob().unwrap();
assert_eq!(&blob.type_(), "image/png");
# }
# }
Returns the raw encoded tile buffer as a Uint8Array.
No format conversion is performed.
This method requires the wasm-node or wasm-web feature.
Contains the encoded tile byte sequence, dimensions, and image format information.
This struct implements
Deref<Target = [u8]>andAsRef<[u8]>, allowing it to be used directly as an encoded byte slice.