pub struct PngsaveBufferOptions {
    pub compression: i32,
    pub interlace: bool,
    pub filter: ForeignPngFilter,
    pub palette: bool,
    pub q: i32,
    pub dither: f64,
    pub bitdepth: i32,
    pub effort: i32,
    pub keep: ForeignKeep,
    pub background: Vec<f64>,
    pub page_height: i32,
    pub profile: String,
}
Expand description

Options for pngsave_buffer operation

Fields§

§compression: i32

compression: i32 -> Compression factor min: 0, max: 9, default: 6

§interlace: bool

interlace: bool -> Interlace image default: false

§filter: ForeignPngFilter

filter: ForeignPngFilter -> libpng row filter flag(s) None -> VIPS_FOREIGN_PNG_FILTER_NONE = 8 [DEFAULT] Sub -> VIPS_FOREIGN_PNG_FILTER_SUB = 16 Up -> VIPS_FOREIGN_PNG_FILTER_UP = 32 Avg -> VIPS_FOREIGN_PNG_FILTER_AVG = 64 Paeth -> VIPS_FOREIGN_PNG_FILTER_PAETH = 128 All -> VIPS_FOREIGN_PNG_FILTER_ALL = 248

§palette: bool

palette: bool -> Quantise to 8bpp palette default: false

§q: i32

q: i32 -> Quantisation quality min: 0, max: 100, default: 100

§dither: f64

dither: f64 -> Amount of dithering min: 0, max: 1, default: 1

§bitdepth: i32

bitdepth: i32 -> Write as a 1, 2, 4, 8 or 16 bit image min: 1, max: 16, default: 8

§effort: i32

effort: i32 -> Quantisation CPU effort min: 1, max: 10, default: 7

§keep: ForeignKeep

keep: ForeignKeep -> Which metadata to retain None -> VIPS_FOREIGN_KEEP_NONE = 0 Exif -> VIPS_FOREIGN_KEEP_EXIF = 1 Xmp -> VIPS_FOREIGN_KEEP_XMP = 2 Iptc -> VIPS_FOREIGN_KEEP_IPTC = 4 Icc -> VIPS_FOREIGN_KEEP_ICC = 8 Other -> VIPS_FOREIGN_KEEP_OTHER = 16 All -> VIPS_FOREIGN_KEEP_ALL = 31 [DEFAULT]

§background: Vec<f64>

background: Vec<f64> -> Background value

§page_height: i32

page_height: i32 -> Set page height for multipage save min: 0, max: 10000000, default: 0

§profile: String

profile: String -> Filename of ICC profile to embed

Trait Implementations§

source§

impl Clone for PngsaveBufferOptions

source§

fn clone(&self) -> PngsaveBufferOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PngsaveBufferOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PngsaveBufferOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.