Enum ndk::bitmap::BitmapCompressFormat
source · #[non_exhaustive]#[repr(i32)]pub enum BitmapCompressFormat {
Jpeg = 0,
Png = 1,
WebPLossy = 3,
WebPLossless = 4,
}
Available on crate features
bitmap
and api-level-30
only.Expand description
Specifies the formats that can be compressed to with Bitmap::compress()
and
Bitmap::compress_raw()
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Jpeg = 0
Compress to the JPEG format.
quality of 0
means compress for the smallest size. 100
means compress for max visual
quality.
Png = 1
Compress to the PNG format.
PNG is lossless, so quality is ignored.
WebPLossy = 3
Compress to the WEBP lossless format.
quality refers to how much effort to put into compression. A value of 0
means to
compress quickly, resulting in a relatively large file size. 100
means to spend more time
compressing, resulting in a smaller file.
WebPLossless = 4
Compress to the WEBP lossy format.
quality of 0
means compress for the smallest size. 100
means compress for max visual quality.
Trait Implementations§
source§impl Clone for BitmapCompressFormat
impl Clone for BitmapCompressFormat
source§fn clone(&self) -> BitmapCompressFormat
fn clone(&self) -> BitmapCompressFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BitmapCompressFormat
impl Debug for BitmapCompressFormat
source§impl From<BitmapCompressFormat> for i32
impl From<BitmapCompressFormat> for i32
source§fn from(enum_value: BitmapCompressFormat) -> Self
fn from(enum_value: BitmapCompressFormat) -> Self
Converts to this type from the input type.
source§impl From<i32> for BitmapCompressFormat
impl From<i32> for BitmapCompressFormat
source§impl FromPrimitive for BitmapCompressFormat
impl FromPrimitive for BitmapCompressFormat
source§impl Hash for BitmapCompressFormat
impl Hash for BitmapCompressFormat
source§impl PartialEq for BitmapCompressFormat
impl PartialEq for BitmapCompressFormat
source§fn eq(&self, other: &BitmapCompressFormat) -> bool
fn eq(&self, other: &BitmapCompressFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for BitmapCompressFormat
impl Eq for BitmapCompressFormat
impl StructuralPartialEq for BitmapCompressFormat
Auto Trait Implementations§
impl Freeze for BitmapCompressFormat
impl RefUnwindSafe for BitmapCompressFormat
impl Send for BitmapCompressFormat
impl Sync for BitmapCompressFormat
impl Unpin for BitmapCompressFormat
impl UnwindSafe for BitmapCompressFormat
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