MeshLib Rust Docs
Loading...
Searching...
No Matches
meshlib::raster_load Namespace Reference

Classes

struct  TiffLoadSettings

Functions

auto from_tiff (path:&str, settings:Option<&meshlib::RasterLoadSettings >, tiffSettings:Option<&meshlib::raster_load::TiffLoadSettings >) -> meshlib::Owned< meshlib::expected_MR_Raster_std_string >
auto info_from_tiff (path:&str) -> meshlib::Owned< meshlib::expected_MR_RasterInfo_std_string >
auto from_any_supported_format (path:&str, settings:Option<&meshlib::RasterLoadSettings >) -> meshlib::Owned< meshlib::expected_MR_Raster_std_string >
auto info_from_any_supported_format (path:&str) -> meshlib::Owned< meshlib::expected_MR_RasterInfo_std_string >

Function Documentation

◆ from_any_supported_format()

auto meshlib::raster_load::from_any_supported_format ( path:& str,
settings:Option<&meshlib::RasterLoadSettings >  ) -> meshlib::Owned< meshlib::expected_MR_Raster_std_string >

detects the format from file extension and loads a raster from it Generated from function MR::RasterLoad::fromAnySupportedFormat.

Calls MR_RasterLoad_fromAnySupportedFormat().

◆ from_tiff()

auto meshlib::raster_load::from_tiff ( path:& str,
settings:Option<&meshlib::RasterLoadSettings > ,
tiffSettings:Option<&meshlib::raster_load::TiffLoadSettings >  ) -> meshlib::Owned< meshlib::expected_MR_Raster_std_string >

loads the first image of a .tiff file as a raster with one layer:

  • gray, palette and RGB images keep the stored samples of any type (gray values, color indices or color components) as channels;
  • libtiff decodes the other formats (gray with alpha, YCbCr, CMYK, less than 8 bits per sample, etc.) to four UInt8 channels of RGBA colors, which are not multiplied by alpha unless the file stores them so (associated alpha);
  • the formats that libtiff cannot decode are read as stored too if each pixel has one sample or three or more interleaved samples of 8 to 64 bits, otherwise loading fails;
  • the files compressed by the methods that libtiff does not support fail to load;
  • the rows keep the stored order whatever the Orientation tag says, also in the decoded formats Generated from function MR::RasterLoad::fromTiff.

Calls MR_RasterLoad_fromTiff().

◆ info_from_any_supported_format()

auto meshlib::raster_load::info_from_any_supported_format ( path:& str) -> meshlib::Owned< meshlib::expected_MR_RasterInfo_std_string >

detects the format from file extension and loads everything about the raster except its samples Generated from function MR::RasterLoad::infoFromAnySupportedFormat.

Calls MR_RasterLoad_infoFromAnySupportedFormat().

◆ info_from_tiff()

auto meshlib::raster_load::info_from_tiff ( path:& str) -> meshlib::Owned< meshlib::expected_MR_RasterInfo_std_string >

loads everything about the raster except its values from .tiff format Generated from function MR::RasterLoad::infoFromTiff.

Calls MR_RasterLoad_infoFromTiff().