Struct html5_picture::core::Config [−][src]
Converts the images (currently png only) of the input folder to webp format. It also has the ability to create multiple versions of the input images having different sizes. See -s for further details. Additionally it automatically generates HTML5
Depends on cwebp, so make sure webp is installed on your pc!
Fields
input_dir: PathBuf
The directory containing all images that should be processed.
scaled_images_count: Option<u8>
The source image width is divided by this option (value + 1). Afterwards the source image is scaled (keeping the aspect ratio) to these widths before convertion. Useful if you want to have multiple sizes of the image on the webpage for different breakpoints.
Example:
Input image dimensions: 6000x962
Scaled images count: 3
Resulting converted images:
[filename] [dimensions] original_filename 6000x962 original_filename-w4500 4500x751 original_filename-w3000 3000x501 original_filename-w1500 1500x250
install_images_into: Option<PathBuf>
Installs the converted and sized pictures into the given folder.
force_overwrite: bool
If true, existing files are overwritten if install_images_into is set.
quality_webp: Option<u8>
Defines the quality of cwebp conversion.
Trait Implementations
impl Clap for Config
[src]
pub fn parse() -> Self
[src]
pub fn try_parse() -> Result<Self, Error>
[src]
pub fn parse_from<I, T>(itr: I) -> Self where
T: Into<OsString> + Clone,
I: IntoIterator<Item = T>,
[src]
T: Into<OsString> + Clone,
I: IntoIterator<Item = T>,
pub fn try_parse_from<I, T>(itr: I) -> Result<Self, Error> where
T: Into<OsString> + Clone,
I: IntoIterator<Item = T>,
[src]
T: Into<OsString> + Clone,
I: IntoIterator<Item = T>,
impl Debug for Config
[src]
impl FromArgMatches for Config
[src]
fn from_arg_matches(matches: &ArgMatches) -> Self
[src]
impl IntoApp for Config
[src]
Auto Trait Implementations
impl RefUnwindSafe for Config
[src]
impl Send for Config
[src]
impl Sync for Config
[src]
impl Unpin for Config
[src]
impl UnwindSafe for Config
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,