pub trait ContentRegionSource {
// Required method
fn content_region(
&self,
src_w: usize,
src_h: usize,
dst_w: usize,
dst_h: usize,
) -> Result<ContentRegion>;
}Expand description
Something that knows where it puts the image content in a destination,
such as the image crate’s ConvertOptions or a PreprocessSpec. The
decoder takes it to map its output back to the source image with the same
geometry the convert used.
Required Methods§
Sourcefn content_region(
&self,
src_w: usize,
src_h: usize,
dst_w: usize,
dst_h: usize,
) -> Result<ContentRegion>
fn content_region( &self, src_w: usize, src_h: usize, dst_w: usize, dst_h: usize, ) -> Result<ContentRegion>
The content region for an src_w×src_h source converted into a
dst_w×dst_h destination.
§Errors
Error::InvalidArgument when the geometry cannot be resolved, e.g.
a source crop outside the source.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".