Skip to content

Commit

Permalink
Impl Serialize/Deserialize for FilterType (#2399)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron404 authored Jan 11, 2025
1 parent f4702f2 commit a7af546
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/imageops/sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use std::f32;

use num_traits::{NumCast, ToPrimitive, Zero};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

use crate::image::{GenericImage, GenericImageView};
use crate::traits::{Enlargeable, Pixel, Primitive};
Expand Down Expand Up @@ -79,6 +81,7 @@ use crate::{ImageBuffer, Rgba32FImage};
/// </tr>
/// </table>
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum FilterType {
/// Nearest Neighbor
Nearest,
Expand Down

0 comments on commit a7af546

Please sign in to comment.