tinify/
transform.rs

1use serde::Deserialize;
2use serde::Serialize;
3
4/// The transform object specifies the stylistic transformations that will be applied to your image. Include a `background property` to fill a transparent image's background. The following options are available to specify a background color:
5/// - A hex value. Custom background color using the color's hex value: `#000000`.
6/// - `white` or `black`. Only the colors white and black are supported as strings.
7///
8/// You must specify a background color if you wish to convert an image with a transparent background to an image type which does not support transparency (like JPEG).
9#[derive(Serialize, Deserialize, Debug)]
10pub struct Transform {
11  pub background: String,
12}