pub struct WasmTransformOptions {Show 14 fields
pub width: Option<u32>,
pub height: Option<u32>,
pub fit: Option<String>,
pub position: Option<String>,
pub format: Option<String>,
pub quality: Option<u8>,
pub background: Option<String>,
pub rotate: Option<u16>,
pub auto_orient: Option<bool>,
pub keep_metadata: Option<bool>,
pub preserve_exif: Option<bool>,
pub crop: Option<String>,
pub blur: Option<f32>,
pub sharpen: Option<f32>,
}Expand description
Browser-facing transform options accepted by the WASM adapter.
The fields intentionally use strings for enum-like values so JavaScript callers do not need to understand the Rust enum layout. The adapter validates and converts these fields before calling the shared Core transformation pipeline.
Fields§
§width: Option<u32>The requested output width in pixels.
height: Option<u32>The requested output height in pixels.
fit: Option<String>The resize fit mode (contain, cover, fill, or inside).
position: Option<String>The crop anchor (center, top-left, and so on).
format: Option<String>The requested output format (jpeg, png, webp, avif, bmp, tiff, or svg).
quality: Option<u8>The requested lossy quality from 1 to 100.
background: Option<String>Optional background color as RRGGBB or RRGGBBAA.
rotate: Option<u16>Optional clockwise rotation in degrees. Supported values are 0, 90, 180, 270.
auto_orient: Option<bool>Whether EXIF auto-orientation should run. Defaults to true.
keep_metadata: Option<bool>Whether all supported metadata should be retained when possible.
preserve_exif: Option<bool>Whether only EXIF metadata should be retained.
crop: Option<String>Explicit crop region as x,y,w,h.
blur: Option<f32>Gaussian blur sigma (0.1–100.0).
sharpen: Option<f32>Sharpen sigma (0.1–100.0).
Trait Implementations§
Source§impl Clone for WasmTransformOptions
impl Clone for WasmTransformOptions
Source§fn clone(&self) -> WasmTransformOptions
fn clone(&self) -> WasmTransformOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WasmTransformOptions
impl Debug for WasmTransformOptions
Source§impl Default for WasmTransformOptions
impl Default for WasmTransformOptions
Source§fn default() -> WasmTransformOptions
fn default() -> WasmTransformOptions
Source§impl<'de> Deserialize<'de> for WasmTransformOptions
impl<'de> Deserialize<'de> for WasmTransformOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for WasmTransformOptions
impl PartialEq for WasmTransformOptions
Source§impl Serialize for WasmTransformOptions
impl Serialize for WasmTransformOptions
impl StructuralPartialEq for WasmTransformOptions
Auto Trait Implementations§
impl Freeze for WasmTransformOptions
impl RefUnwindSafe for WasmTransformOptions
impl Send for WasmTransformOptions
impl Sync for WasmTransformOptions
impl Unpin for WasmTransformOptions
impl UnsafeUnpin for WasmTransformOptions
impl UnwindSafe for WasmTransformOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more