Skip to content

Commit d4963d6

Browse files
committed
Made features easier to understand
1 parent f4b7854 commit d4963d6

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ homepage = "https://github.com/image-rs/imageproc"
1212
exclude = [".github/*", "examples/*", "tests/*"]
1313

1414
[features]
15-
default = ["rayon", "image/default", "ab_glyph", "rustdct"]
15+
default = ["rayon", "image/default", "text", "image_hash"]
1616
display-window = ["sdl2"]
1717
rayon = ["dep:rayon", "image/rayon"]
1818

19+
# Option: enable image_hash
20+
image_hash = ["dep:rustdct"]
21+
22+
# Option: enable drawing::text
23+
text = ["dep:ab_glyph"]
24+
1925
[dependencies]
2026
ab_glyph = { version = "0.2.23", default-features = false, features = ["std"], optional = true}
2127
approx = { version = "0.5", default-features = false }

src/drawing/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ pub use self::rect::{
3232
draw_filled_rect, draw_filled_rect_mut, draw_hollow_rect, draw_hollow_rect_mut,
3333
};
3434

35-
#[cfg(feature = "ab_glyph")]
35+
#[cfg(feature = "text")]
3636
mod text;
3737

38-
#[cfg(feature = "ab_glyph")]
38+
#[cfg(feature = "text")]
3939
pub use self::text::{draw_text, draw_text_mut, text_size};
4040

4141
mod fill;

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub mod gradients;
3737
pub mod haar;
3838
pub mod hog;
3939
pub mod hough;
40-
#[cfg(feature = "rustdct")]
40+
#[cfg(feature = "image_hash")]
4141
pub mod image_hash;
4242
pub mod integral_image;
4343
pub mod kernel;

0 commit comments

Comments
 (0)