Hide modules from documentation, and only export structs used in options or return types
This commit is contained in:
parent
fe9fd95b21
commit
88f5bb0931
10 changed files with 148 additions and 94 deletions
|
|
@ -1,3 +1,9 @@
|
|||
### Version 0.18.4
|
||||
- Bump dependencies, reduces binary size by a considerable amount
|
||||
- Hide all modules from documentation, and only export the specific structures that should be public.
|
||||
Previously there were too many implementation details made public. The modules are still public for the purposes of our integration tests,
|
||||
but we strongly advice against using undocumented modules. These may become private in the future.
|
||||
|
||||
### Version 0.18.3
|
||||
- Return exit code of 1 if an error occurred while processing a file using the CLI app ([#93](https://github.com/shssoichiro/oxipng/issues/93))
|
||||
|
||||
|
|
|
|||
|
|
@ -237,5 +237,7 @@ fn inflate_generic(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { deflate::inflate(png.idat_data.as_ref()).ok(); });
|
||||
b.iter(|| {
|
||||
deflate::inflate(png.idat_data.as_ref()).ok();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ fn filters_16_bits_filter_0(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(0); });
|
||||
b.iter(|| {
|
||||
png.filter_image(0);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -20,7 +22,9 @@ fn filters_8_bits_filter_0(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(0); });
|
||||
b.iter(|| {
|
||||
png.filter_image(0);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -30,7 +34,9 @@ fn filters_4_bits_filter_0(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(0); });
|
||||
b.iter(|| {
|
||||
png.filter_image(0);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -40,7 +46,9 @@ fn filters_2_bits_filter_0(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(0); });
|
||||
b.iter(|| {
|
||||
png.filter_image(0);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -50,7 +58,9 @@ fn filters_1_bits_filter_0(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(0); });
|
||||
b.iter(|| {
|
||||
png.filter_image(0);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -58,7 +68,9 @@ fn filters_16_bits_filter_1(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(1); });
|
||||
b.iter(|| {
|
||||
png.filter_image(1);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -66,7 +78,9 @@ fn filters_8_bits_filter_1(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(1); });
|
||||
b.iter(|| {
|
||||
png.filter_image(1);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -76,7 +90,9 @@ fn filters_4_bits_filter_1(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(1); });
|
||||
b.iter(|| {
|
||||
png.filter_image(1);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -86,7 +102,9 @@ fn filters_2_bits_filter_1(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(1); });
|
||||
b.iter(|| {
|
||||
png.filter_image(1);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -96,7 +114,9 @@ fn filters_1_bits_filter_1(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(1); });
|
||||
b.iter(|| {
|
||||
png.filter_image(1);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -104,7 +124,9 @@ fn filters_16_bits_filter_2(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(2); });
|
||||
b.iter(|| {
|
||||
png.filter_image(2);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -112,7 +134,9 @@ fn filters_8_bits_filter_2(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(2); });
|
||||
b.iter(|| {
|
||||
png.filter_image(2);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -122,7 +146,9 @@ fn filters_4_bits_filter_2(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(2); });
|
||||
b.iter(|| {
|
||||
png.filter_image(2);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -132,7 +158,9 @@ fn filters_2_bits_filter_2(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(2); });
|
||||
b.iter(|| {
|
||||
png.filter_image(2);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -142,7 +170,9 @@ fn filters_1_bits_filter_2(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(2); });
|
||||
b.iter(|| {
|
||||
png.filter_image(2);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -150,7 +180,9 @@ fn filters_16_bits_filter_3(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(3); });
|
||||
b.iter(|| {
|
||||
png.filter_image(3);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -158,7 +190,9 @@ fn filters_8_bits_filter_3(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(3); });
|
||||
b.iter(|| {
|
||||
png.filter_image(3);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -168,7 +202,9 @@ fn filters_4_bits_filter_3(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(3); });
|
||||
b.iter(|| {
|
||||
png.filter_image(3);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -178,7 +214,9 @@ fn filters_2_bits_filter_3(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(3); });
|
||||
b.iter(|| {
|
||||
png.filter_image(3);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -188,7 +226,9 @@ fn filters_1_bits_filter_3(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(3); });
|
||||
b.iter(|| {
|
||||
png.filter_image(3);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -196,7 +236,9 @@ fn filters_16_bits_filter_4(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(4); });
|
||||
b.iter(|| {
|
||||
png.filter_image(4);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -204,7 +246,9 @@ fn filters_8_bits_filter_4(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(4); });
|
||||
b.iter(|| {
|
||||
png.filter_image(4);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -214,7 +258,9 @@ fn filters_4_bits_filter_4(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(4); });
|
||||
b.iter(|| {
|
||||
png.filter_image(4);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -224,7 +270,9 @@ fn filters_2_bits_filter_4(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(4); });
|
||||
b.iter(|| {
|
||||
png.filter_image(4);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -234,7 +282,9 @@ fn filters_1_bits_filter_4(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(4); });
|
||||
b.iter(|| {
|
||||
png.filter_image(4);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -242,7 +292,9 @@ fn filters_16_bits_filter_5(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(5); });
|
||||
b.iter(|| {
|
||||
png.filter_image(5);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -250,7 +302,9 @@ fn filters_8_bits_filter_5(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(5); });
|
||||
b.iter(|| {
|
||||
png.filter_image(5);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -260,7 +314,9 @@ fn filters_4_bits_filter_5(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(5); });
|
||||
b.iter(|| {
|
||||
png.filter_image(5);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -270,7 +326,9 @@ fn filters_2_bits_filter_5(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(5); });
|
||||
b.iter(|| {
|
||||
png.filter_image(5);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -280,5 +338,7 @@ fn filters_1_bits_filter_5(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { png.filter_image(5); });
|
||||
b.iter(|| {
|
||||
png.filter_image(5);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,9 @@ fn zopfli_16_bits_strategy_0(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { deflate::zopfli_deflate(png.raw_data.as_ref()).ok(); });
|
||||
b.iter(|| {
|
||||
deflate::zopfli_deflate(png.raw_data.as_ref()).ok();
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -21,7 +23,9 @@ fn zopfli_8_bits_strategy_0(b: &mut Bencher) {
|
|||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { deflate::zopfli_deflate(png.raw_data.as_ref()).ok(); });
|
||||
b.iter(|| {
|
||||
deflate::zopfli_deflate(png.raw_data.as_ref()).ok();
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -31,7 +35,9 @@ fn zopfli_4_bits_strategy_0(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { deflate::zopfli_deflate(png.raw_data.as_ref()).ok(); });
|
||||
b.iter(|| {
|
||||
deflate::zopfli_deflate(png.raw_data.as_ref()).ok();
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -41,7 +47,9 @@ fn zopfli_2_bits_strategy_0(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { deflate::zopfli_deflate(png.raw_data.as_ref()).ok(); });
|
||||
b.iter(|| {
|
||||
deflate::zopfli_deflate(png.raw_data.as_ref()).ok();
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
|
@ -51,5 +59,7 @@ fn zopfli_1_bits_strategy_0(b: &mut Bencher) {
|
|||
));
|
||||
let png = png::PngData::new(&input, false).unwrap();
|
||||
|
||||
b.iter(|| { deflate::zopfli_deflate(png.raw_data.as_ref()).ok(); });
|
||||
b.iter(|| {
|
||||
deflate::zopfli_deflate(png.raw_data.as_ref()).ok();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,11 +106,6 @@ impl Stream<Compress> {
|
|||
rc
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn reset(&mut self) -> c_int {
|
||||
unsafe { miniz_sys::mz_deflateReset(&mut self.raw) }
|
||||
}
|
||||
}
|
||||
|
||||
impl Direction for Compress {
|
||||
|
|
|
|||
13
src/lib.rs
13
src/lib.rs
|
|
@ -12,10 +12,7 @@ extern crate num_cpus;
|
|||
extern crate rayon;
|
||||
extern crate zopfli;
|
||||
|
||||
use deflate::Deflaters;
|
||||
pub use error::PngError;
|
||||
use image::{GenericImage, ImageFormat, Pixel};
|
||||
use headers::Headers;
|
||||
use png::PngData;
|
||||
use rayon::prelude::*;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
|
@ -23,12 +20,22 @@ use std::fs::{copy, File};
|
|||
use std::io::{stdout, BufWriter, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
pub use colors::AlphaOptim;
|
||||
pub use deflate::Deflaters;
|
||||
pub use error::PngError;
|
||||
pub use headers::Headers;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod colors;
|
||||
#[doc(hidden)]
|
||||
pub mod deflate;
|
||||
#[doc(hidden)]
|
||||
pub mod error;
|
||||
mod filters;
|
||||
#[doc(hidden)]
|
||||
pub mod headers;
|
||||
mod interlace;
|
||||
#[doc(hidden)]
|
||||
pub mod png;
|
||||
mod reduction;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ extern crate regex;
|
|||
|
||||
use clap::{App, Arg, ArgMatches};
|
||||
use glob::glob;
|
||||
use oxipng::colors::AlphaOptim;
|
||||
use oxipng::deflate::Deflaters;
|
||||
use oxipng::headers::Headers;
|
||||
use oxipng::AlphaOptim;
|
||||
use oxipng::Deflaters;
|
||||
use oxipng::Headers;
|
||||
use oxipng::{Options, PngError};
|
||||
use regex::Regex;
|
||||
use std::collections::HashSet;
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ pub struct PngData {
|
|||
impl PngData {
|
||||
/// Create a new `PngData` struct by opening a file
|
||||
#[inline]
|
||||
#[cfg(test)]
|
||||
pub fn new(filepath: &Path, fix_errors: bool) -> Result<PngData, PngError> {
|
||||
let byte_data = PngData::read_file(filepath)?;
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ fn test_it_converts(
|
|||
remove_file(output).ok();
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn interlaced_rgba_16_should_be_rgba_16() {
|
||||
let input = PathBuf::from("tests/files/interlaced_rgba_16_should_be_rgba_16.png");
|
||||
|
|
@ -296,9 +295,7 @@ fn interlaced_rgba_8_should_be_palette_1() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_rgba_16_should_be_grayscale_alpha_16() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_rgba_16_should_be_grayscale_alpha_16.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/interlaced_rgba_16_should_be_grayscale_alpha_16.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -315,9 +312,7 @@ fn interlaced_rgba_16_should_be_grayscale_alpha_16() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_rgba_16_should_be_grayscale_alpha_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_rgba_16_should_be_grayscale_alpha_8.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/interlaced_rgba_16_should_be_grayscale_alpha_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -334,9 +329,7 @@ fn interlaced_rgba_16_should_be_grayscale_alpha_8() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_rgba_8_should_be_grayscale_alpha_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_rgba_8_should_be_grayscale_alpha_8.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/interlaced_rgba_8_should_be_grayscale_alpha_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -812,9 +805,8 @@ fn interlaced_palette_1_should_be_palette_1() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_grayscale_alpha_16_should_be_grayscale_alpha_16() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_grayscale_alpha_16_should_be_grayscale_alpha_16.png",
|
||||
);
|
||||
let input =
|
||||
PathBuf::from("tests/files/interlaced_grayscale_alpha_16_should_be_grayscale_alpha_16.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -831,9 +823,8 @@ fn interlaced_grayscale_alpha_16_should_be_grayscale_alpha_16() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_grayscale_alpha_16_should_be_grayscale_alpha_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_grayscale_alpha_16_should_be_grayscale_alpha_8.png",
|
||||
);
|
||||
let input =
|
||||
PathBuf::from("tests/files/interlaced_grayscale_alpha_16_should_be_grayscale_alpha_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -850,9 +841,8 @@ fn interlaced_grayscale_alpha_16_should_be_grayscale_alpha_8() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_grayscale_alpha_8_should_be_grayscale_alpha_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_grayscale_alpha_8_should_be_grayscale_alpha_8.png",
|
||||
);
|
||||
let input =
|
||||
PathBuf::from("tests/files/interlaced_grayscale_alpha_8_should_be_grayscale_alpha_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -869,9 +859,8 @@ fn interlaced_grayscale_alpha_8_should_be_grayscale_alpha_8() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_grayscale_alpha_16_should_be_grayscale_16() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_grayscale_alpha_16_should_be_grayscale_16.png",
|
||||
);
|
||||
let input =
|
||||
PathBuf::from("tests/files/interlaced_grayscale_alpha_16_should_be_grayscale_16.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -888,9 +877,8 @@ fn interlaced_grayscale_alpha_16_should_be_grayscale_16() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_grayscale_alpha_16_should_be_grayscale_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_grayscale_alpha_16_should_be_grayscale_8.png",
|
||||
);
|
||||
let input =
|
||||
PathBuf::from("tests/files/interlaced_grayscale_alpha_16_should_be_grayscale_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -907,9 +895,7 @@ fn interlaced_grayscale_alpha_16_should_be_grayscale_8() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_grayscale_alpha_8_should_be_grayscale_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_grayscale_alpha_8_should_be_grayscale_8.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/interlaced_grayscale_alpha_8_should_be_grayscale_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -926,9 +912,7 @@ fn interlaced_grayscale_alpha_8_should_be_grayscale_8() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_grayscale_16_should_be_grayscale_16() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_grayscale_16_should_be_grayscale_16.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/interlaced_grayscale_16_should_be_grayscale_16.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -945,9 +929,7 @@ fn interlaced_grayscale_16_should_be_grayscale_16() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_grayscale_16_should_be_grayscale_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_grayscale_16_should_be_grayscale_8.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/interlaced_grayscale_16_should_be_grayscale_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -964,9 +946,7 @@ fn interlaced_grayscale_16_should_be_grayscale_8() {
|
|||
|
||||
#[test]
|
||||
fn interlaced_grayscale_8_should_be_grayscale_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/interlaced_grayscale_8_should_be_grayscale_8.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/interlaced_grayscale_8_should_be_grayscale_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ fn test_it_converts(
|
|||
remove_file(output).ok();
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn rgba_16_should_be_rgba_16() {
|
||||
let input = PathBuf::from("tests/files/rgba_16_should_be_rgba_16.png");
|
||||
|
|
@ -806,9 +805,7 @@ fn palette_1_should_be_palette_1() {
|
|||
|
||||
#[test]
|
||||
fn grayscale_alpha_16_should_be_grayscale_alpha_16() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/grayscale_alpha_16_should_be_grayscale_alpha_16.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/grayscale_alpha_16_should_be_grayscale_alpha_16.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -825,9 +822,7 @@ fn grayscale_alpha_16_should_be_grayscale_alpha_16() {
|
|||
|
||||
#[test]
|
||||
fn grayscale_alpha_16_should_be_grayscale_alpha_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/grayscale_alpha_16_should_be_grayscale_alpha_8.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/grayscale_alpha_16_should_be_grayscale_alpha_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
@ -844,9 +839,7 @@ fn grayscale_alpha_16_should_be_grayscale_alpha_8() {
|
|||
|
||||
#[test]
|
||||
fn grayscale_alpha_8_should_be_grayscale_alpha_8() {
|
||||
let input = PathBuf::from(
|
||||
"tests/files/grayscale_alpha_8_should_be_grayscale_alpha_8.png",
|
||||
);
|
||||
let input = PathBuf::from("tests/files/grayscale_alpha_8_should_be_grayscale_alpha_8.png");
|
||||
let opts = get_opts(&input);
|
||||
let output = opts.out_file.clone();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue