diff --git a/plotters-svg/Cargo.toml b/plotters-svg/Cargo.toml index 4075b2e7..d1c65cc1 100644 --- a/plotters-svg/Cargo.toml +++ b/plotters-svg/Cargo.toml @@ -16,7 +16,7 @@ version = "0.3.6" path = "../plotters-backend" [dependencies.image] -version = "0.25.9" +version = "0.25.10" optional = true default-features = false features = ["jpeg", "png", "bmp"] diff --git a/plotters-svg/src/svg.rs b/plotters-svg/src/svg.rs index e24623d7..adc6a478 100644 --- a/plotters-svg/src/svg.rs +++ b/plotters-svg/src/svg.rs @@ -602,7 +602,7 @@ impl<'a> DrawingBackend for SVGBackend<'a> { let color = image::ColorType::Rgb8; - encoder.write_image(src, w, h, color).map_err(|e| { + encoder.write_image(src, w, h, color.into()).map_err(|e| { DrawingErrorKind::DrawingError(Error::new( std::io::ErrorKind::Other, format!("Image error: {}", e),