usecrate::Result;usecrate::VipsImage;/// Extension trait for thumbnailing encoded image bytes.
////// Prefer this over `from_buffer` + [`VipsImage::thumbnail`]: `vips_thumbnail_buffer`
/// combines decode + resize so libvips can shrink-on-load.
pubtraitVipsBuffer{/// Decode `self` as an encoded image and produce a `width`×`height` thumbnail.
////// The returned image may retain a lazy load pipeline that reads from
/// `self`; keep the buffer alive until the thumbnail is fully consumed.
////// # Errors
/// Returns an error if the buffer is not a valid image or thumbnail fails.
fnthumbnail(&self, width:u32, height:u32, size:vips_sys::VipsSize)->Result<VipsImage<'_>>;}implVipsBuffer for [u8] {fnthumbnail(&self,
width:u32,
height:u32,
size:vips_sys::VipsSize,
)->Result<VipsImage<'_>>{VipsImage::thumbnail_buffer(self, width, height, size)}}