Fix img-parts crashing on VP8L webp
This commit is contained in:
parent
d5e1e25127
commit
9232d785d0
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "libcaesium"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
authors = ["Matteo Paonessa <matteo.paonessa@gmail.com>"]
|
||||
edition = "2021"
|
||||
categories = ["multimedia::images"]
|
||||
|
@ -39,12 +39,12 @@ gifsicle = { version = "1.95", optional = true }
|
|||
webp = { version = "0.3.0", optional = true }
|
||||
infer = "0.16.0"
|
||||
image = { version = "0.25.1", default-features = false }
|
||||
img-parts = "0.3"
|
||||
img-parts = { git = "https://github.com/Lymphatus/img-parts", rev = "6a0cd0d" }
|
||||
bytes = "1.7"
|
||||
lodepng = { version = "3.10", optional = true }
|
||||
imagequant = { version = "4.3", optional = true, default-features = false }
|
||||
tiff = { version = "0.9" }
|
||||
kamadak-exif = "0.5"
|
||||
kamadak-exif = "0.6"
|
||||
|
||||
[dev-dependencies]
|
||||
dssim = { version = "3.3", default-features = false, features = ["no-macos-vimage"] }
|
||||
|
|
|
@ -10,9 +10,10 @@ fn main() -> ExitCode {
|
|||
let output = args[2].clone();
|
||||
|
||||
let mut parameters = CSParameters::new();
|
||||
parameters.png.quality = 60;
|
||||
parameters.keep_metadata = true;
|
||||
parameters.webp.quality = 60;
|
||||
|
||||
match convert(input, output, ¶meters, caesium::SupportedFileTypes::Png) {
|
||||
match convert(input, output, ¶meters, caesium::SupportedFileTypes::WebP) {
|
||||
Ok(_) => ExitCode::SUCCESS,
|
||||
Err(e) => {
|
||||
eprintln!("{}", e);
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
use caesium::parameters::CSParameters;
|
||||
use caesium::compress;
|
||||
use std::env;
|
||||
use std::process::ExitCode;
|
||||
|
||||
fn main() -> ExitCode {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
|
||||
let input = args[1].clone();
|
||||
let output = args[2].clone();
|
||||
|
||||
let mut parameters = CSParameters::new();
|
||||
parameters.keep_metadata = true;
|
||||
parameters.optimize = true;
|
||||
|
||||
match compress(input, output, ¶meters) {
|
||||
Ok(_) => ExitCode::SUCCESS,
|
||||
Err(e) => {
|
||||
eprintln!("{}", e);
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue