diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/render.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render.rs b/src/render.rs index 3560b5a..cb6a4fb 100644 --- a/src/render.rs +++ b/src/render.rs @@ -1,8 +1,8 @@ use super::api::{Api, ApiError, Skill, Specialization, Trait}; use super::bt::{BuildTemplate, TraitChoice, Traitline}; use image::{ - imageops, CatmullRom, DynamicImage, GenericImage, GenericImageView, ImageBuffer, Pixel, - Primitive, Rgba, RgbaImage, + imageops, imageops::FilterType::CatmullRom, DynamicImage, GenericImage, GenericImageView, + ImageBuffer, Pixel, Primitive, Rgba, RgbaImage, }; use imageproc::{drawing, rect::Rect}; use num_traits::{Num, NumCast}; @@ -165,7 +165,7 @@ impl<'r> Renderer<'r> { self.options.skill_size, CatmullRom, ); - buffer.copy_from(&img, i as u32 * self.options.skill_size, 0); + buffer.copy_from(&img, i as u32 * self.options.skill_size, 0)?; } } Ok(buffer) @@ -391,7 +391,7 @@ impl<'r> Renderer<'r> { Alignment::Center => half(width - image.width()), Alignment::Right => width - image.width(), }; - buffer.copy_from(image, pos_x, pos_y); + buffer.copy_from(image, pos_x, pos_y)?; pos_y += image.height(); } |