pub struct RgbData {
pub data: Vec<u8>,
pub width: u32,
pub height: u32,
pub interpolate: bool,
pub scale_factors: (f32, f32),
}Expand description
A structure holding 3-channel RGB data.
Fields§
§data: Vec<u8>The actual data. It is guaranteed to have the length width * height * 3.
width: u32The width.
height: u32The height.
interpolate: boolWhether the image should be interpolated.
scale_factors: (f32, f32)Additional scaling factors to apply to the image.
In most cases, those factors will just be 1.0, and you can ignore them. There are two situations in which they will not be equal to 1:
- The PDF provided wrong metadata about the width/height of the image, which needs to be corrected
- A lower resolution of the image was requested, in which case it needs to be scaled up so that it still covers the same area.
The first number indicates the x scaling factor, the second number the y scaling factor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RgbData
impl RefUnwindSafe for RgbData
impl Send for RgbData
impl Sync for RgbData
impl Unpin for RgbData
impl UnwindSafe for RgbData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more