Codebase list rust-stfu8 / fcf3f89
image: update to 0.24.3 Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email> Fabian Grünbichler 1 year, 7 months ago
10 changed file(s) with 89 addition(s) and 161 deletion(s). Raw diff Collapse all Expand all
0 upload after cargo is in unstable
0 rust-image (0.24.3-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
1
2 * Team upload.
3 * Package image 0.24.3 from crates.io using debcargo 2.5.0
4
5 -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Sat, 17 Sep 2022 20:33:14 +0200
6
07 rust-image (0.23.14-2) unstable; urgency=medium
18
29 * Team upload.
3232 FIXME (overlay): These notices are extracted from files. Please review them
3333 before uploading to the archive.
3434
35 Files: ./src/math/nq.rs
36 Copyright: 1994 Anthony Dekker
37 License: UNKNOWN-LICENSE; FIXME (overlay)
38 Comment:
39 FIXME (overlay): These notices are extracted from files. Please review them
40 before uploading to the archive.
41
4235 Files: debian/*
4336 Copyright:
4437 2019-2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+0
-26
src/image/debian/patches/avoid-test-overflow-32-bit.patch less more
0 Description: Dont run huge_files_return_error test on 32-bit to avoid overflow.
1 Author: Peter Michael Green <plugwash@debian.org>
2
3 ---
4 The information above should follow the Patch Tagging Guidelines, please
5 checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
6 are templates for supplementary fields that you might want to add:
7
8 Origin: <vendor|upstream|other>, <url of original patch>
9 Bug: <url in upstream bugtracker>
10 Bug-Debian: https://bugs.debian.org/<bugnumber>
11 Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
12 Forwarded: <no|not-needed|url proving that it has been forwarded>
13 Reviewed-By: <name and email of someone who approved the patch>
14 Last-Update: 2022-04-28
15
16 --- rust-image-0.23.14.orig/src/codecs/bmp/encoder.rs
17 +++ rust-image-0.23.14/src/codecs/bmp/encoder.rs
18 @@ -294,6 +294,7 @@ mod tests {
19 }
20
21 #[test]
22 + #[cfg(target_pointer_width = "64")]
23 fn huge_files_return_error() {
24 let mut encoded_data = Vec::new();
25 let image = vec![0u8; 3 * 40_000 * 40_000]; // 40_000x40_000 pixels, 3 bytes per pixel, allocated on the heap
11 ===================================================================
22 --- image.orig/Cargo.toml
33 +++ image/Cargo.toml
4 @@ -23,24 +23,12 @@ readme = "README.md"
5 categories = ["multimedia::images", "multimedia::encoding"]
4 @@ -31,25 +31,12 @@ categories = [
65 license = "MIT"
76 repository = "https://github.com/image-rs/image"
7 resolver = "2"
88 +autobenches = false
99
1010 [lib]
2424 -[[bench]]
2525 -name = "copy_from"
2626 -harness = false
27 -
2728 [dependencies.bytemuck]
28 version = "1"
29
30 @@ -104,9 +92,6 @@ optional = true
29 version = "1.7.0"
30 features = ["extern_crate_alloc"]
31 @@ -112,9 +99,6 @@ optional = true
3132 [dev-dependencies.crc32fast]
3233 version = "1.2.0"
3334
11 ===================================================================
22 --- image.orig/Cargo.toml
33 +++ image/Cargo.toml
4 @@ -38,14 +38,6 @@ version = "1.3.2"
4 @@ -47,14 +47,6 @@ version = "1.3.2"
55 [dependencies.color_quant]
66 version = "1.1"
77
1010 -optional = true
1111 -
1212 -[dependencies.dcv-color-primitives]
13 -version = "0.1.16"
13 -version = "0.4.0"
1414 -optional = true
1515 -
1616 [dependencies.gif]
1717 version = "0.11.1"
1818 optional = true
19 @@ -56,10 +48,6 @@ optional = true
19 @@ -65,10 +57,6 @@ optional = true
2020 default-features = false
2121 package = "jpeg-decoder"
2222
2323 -[dependencies.mp4parse]
24 -version = "0.11.5"
24 -version = "0.12.0"
2525 -optional = true
2626 -
27 [dependencies.num-iter]
28 version = "0.1.32"
29
30 @@ -74,17 +62,9 @@ version = "0.2.0"
31 version = "0.16.5"
27 [dependencies.num-rational]
28 version = "0.4"
29 default-features = false
30 @@ -80,14 +68,6 @@ version = "0.2.0"
31 version = "0.17.0"
3232 optional = true
3333
3434 -[dependencies.ravif]
35 -version = "0.6.0"
35 -version = "0.8.0"
3636 -optional = true
3737 -
3838 -[dependencies.rgb]
4242 [dependencies.scoped_threadpool]
4343 version = "0.1"
4444 optional = true
45
46 [dependencies.tiff]
47 version = "0.6.0"
48 @@ -102,16 +81,13 @@ version = "0.4"
49 version = "1.0"
45 @@ -115,16 +95,6 @@ version = "0.4"
46 version = "1"
5047
5148 [features]
5249 -avif = ["avif-encoder"]
53 -avif-decoder = ["mp4parse", "dcv-color-primitives", "dav1d"]
54 -avif-encoder = ["ravif", "rgb"]
50 -avif-decoder = [
51 - "mp4parse",
52 - "dcv-color-primitives",
53 - "dav1d",
54 -]
55 -avif-encoder = [
56 - "ravif",
57 - "rgb",
58 -]
5559 benchmarks = []
5660 bmp = []
5761 dds = ["dxt"]
58 default = ["gif", "jpeg", "ico", "png", "pnm", "tga", "tiff", "webp", "bmp", "hdr", "dxt", "dds", "farbfeld", "jpeg_rayon"]
62 @@ -143,7 +113,6 @@ default = [
63 "dds",
64 "farbfeld",
65 "jpeg_rayon",
66 - "openexr",
67 ]
5968 dxt = []
6069 farbfeld = []
61 hdr = ["scoped_threadpool"]
62 ico = ["bmp", "png"]
70 @@ -153,11 +122,6 @@ ico = [
71 "png",
72 ]
6373 jpeg_rayon = ["jpeg/rayon"]
74 -openexr = ["exr"]
6475 pnm = []
76 tga = []
77 webp = []
78 -
79 -[target."cfg(target_endian = \"little\")".dependencies.exr]
80 -version = "1.4.2"
81 -optional = true
11 ===================================================================
22 --- image.orig/src/codecs/bmp/decoder.rs
33 +++ image/src/codecs/bmp/decoder.rs
4 @@ -1493,12 +1493,12 @@ mod test {
5 }
4 @@ -1572,13 +1572,13 @@ mod test {
65 }
76
8 - #[test]
9 + /*#[test]
10 fn read_rect() {
7 #[test]
8 - fn read_rect() {
9 + /*fn read_rect() {
1110 let f = std::fs::File::open("tests/images/bmp/images/Core_8_Bit.bmp").unwrap();
1211 let mut decoder = super::BmpDecoder::new(f).unwrap();
1312
1514 decoder.read_rect(0, 0, 8, 8, &mut *buf).unwrap();
1615 - }
1716 + }*/
18 }
17
18 #[test]
19 fn read_rle_too_short() {
1920 Index: image/src/codecs/png.rs
2021 ===================================================================
2122 --- image.orig/src/codecs/png.rs
2223 +++ image/src/codecs/png.rs
23 @@ -652,7 +652,7 @@ mod tests {
24 use std::io::Read;
25 use super::*;
24 @@ -711,7 +711,7 @@ mod tests {
25
26 use std::io::{Cursor, Read};
2627
2728 - #[test]
2829 + /*#[test]
2930 fn ensure_no_decoder_off_by_one() {
30 let dec = PngDecoder::new(std::fs::File::open("tests/images/png/bugfixes/debug_triangle_corners_widescreen.png").unwrap())
31 .expect("Unable to read PNG file (does it exist?)");
32 @@ -673,9 +673,9 @@ mod tests {
31 let dec = PngDecoder::new(
32 std::fs::File::open("tests/images/png/bugfixes/debug_triangle_corners_widescreen.png")
33 @@ -735,9 +735,9 @@ mod tests {
3334 .collect::<Vec<u8>>();
3435
3536 assert_eq![6_000_000, correct_bytes.len()];
4142 fn underlying_error() {
4243 use std::error::Error;
4344
44 @@ -688,5 +688,5 @@ mod tests {
45 .unwrap()
45 @@ -753,6 +753,7 @@ mod tests {
4646 .downcast_ref::<png::DecodingError>()
4747 .expect("Caused by a png error");
48 - }
49 + }*/
50 }
48 }
49 + */
50
51 #[test]
52 fn encode_bad_color_type() {
5153 Index: image/src/dynimage.rs
5254 ===================================================================
5355 --- image.orig/src/dynimage.rs
5456 +++ image/src/dynimage.rs
55 @@ -1341,7 +1341,7 @@ mod test {
57 @@ -1242,7 +1242,7 @@ mod test {
5658 assert!(super::load_from_memory(b"").is_err());
5759 }
5860
6163 #[test]
6264 fn image_dimensions() {
6365 let im_path = "./tests/images/jpg/progressive/cat.jpg";
64 @@ -1355,5 +1355,5 @@ mod test {
65 let im_path = "./tests/images/png/16bpc/basn6a16.png";
66 @@ -1257,6 +1257,7 @@ mod test {
6667 let image = super::open(im_path).unwrap();
6768 assert_eq!(image.color(), super::color::ColorType::Rgba16);
68 - }
69 + }*/
70 }
69 }
70 + */
71
72 fn test_grayscale(mut img: super::DynamicImage, alpha_discarded: bool) {
73 use crate::image::{GenericImage, GenericImageView};
7174 Index: image/src/imageops/sample.rs
7275 ===================================================================
7376 --- image.orig/src/imageops/sample.rs
7477 +++ image/src/imageops/sample.rs
75 @@ -837,7 +837,7 @@ mod tests {
78 @@ -864,7 +864,7 @@ mod tests {
7679 #[cfg(feature = "benchmarks")]
7780 use test;
7881
8184 #[cfg(all(feature = "benchmarks", feature = "png"))]
8285 fn bench_resize(b: &mut test::Bencher) {
8386 use std::path::Path;
84 @@ -846,7 +846,7 @@ mod tests {
87 @@ -873,7 +873,7 @@ mod tests {
8588 test::black_box(resize(&img, 200, 200, FilterType::Nearest));
8689 });
8790 b.bytes = 800 * 800 * 3 + 200 * 200 * 3;
9093
9194 #[test]
9295 fn test_issue_186() {
93 @@ -854,7 +854,7 @@ mod tests {
96 @@ -881,7 +881,7 @@ mod tests {
9497 let _ = resize(&img, 50, 50, FilterType::Lanczos3);
9598 }
9699
98101 + /*#[bench]
99102 #[cfg(all(feature = "benchmarks", feature = "tiff"))]
100103 fn bench_thumbnail(b: &mut test::Bencher) {
101 let path = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/images/tiff/testsuite/mandrill.tiff");
102 @@ -885,9 +885,9 @@ mod tests {
104 let path = concat!(
105 @@ -921,9 +921,9 @@ mod tests {
103106 test::black_box(image.thumbnail(256, 256));
104107 });
105108 b.bytes = 193 * 193 * 4 + 256 * 256 * 4;
111114 #[cfg(feature = "png")]
112115 fn resize_transparent_image() {
113116 use super::FilterType::{CatmullRom, Gaussian, Lanczos3, Nearest, Triangle};
114 @@ -916,5 +916,5 @@ mod tests {
115 for filter in filters {
116 assert_resize(rgba8, filter.clone());
117 @@ -955,6 +955,7 @@ mod tests {
118 assert_resize(rgba8, *filter);
117119 }
118 - }
119 + }*/
120 }
120 }
121 + */
122
123 #[test]
124 fn bug_1600() {
+0
-40
src/image/debian/patches/fix-tests-quickcheck-1.patch less more
0 This patch is based on the upstream commit described below, adapted for use in
1 the Debian package by Peter Michael Green.
2
3 commit dee559021800e204221ddea220fd7c1de6864851
4 Author: Andreas Molzer <andreas.molzer@gmx.de>
5 Date: Wed Jan 26 23:24:16 2022 +0100
6
7 Succeed early on unusual resize quickcheck case
8
9 The quickcheck now exits early when checking resizing when it runs into
10 the case where we are limited by `u32::MAX`. These cases should still be
11 handled fine but in general should probably be covered by a separate
12 test. In particular we can no longer expect the new size to be exact in
13 the requested dimension.
14
15 --- a/src/math/utils.rs
16 +++ b/src/math/utils.rs
17 @@ -9,3 +9,3 @@
18 /// aspect ratio), or will shrink so that both dimensions are
19 -/// completely contained with in the given `width` and `height`,
20 +/// completely contained within the given `width` and `height`,
21 /// with empty space on one axis.
22 @@ -46,4 +46,7 @@
23 if old_w == 0 || new_w == 0 { return true; }
24 + if new_w as u64 * 400u64 >= old_w as u64 * u64::from(u32::MAX) { return true; }
25 +
26 let result = super::resize_dimensions(old_w, 400, new_w, ::std::u32::MAX, false);
27 - result.0 == new_w && result.1 == (400 as f64 * new_w as f64 / old_w as f64) as u32
28 + let exact = (400 as f64 * new_w as f64 / old_w as f64) as u32;
29 + result.0 == new_w && result.1 == exact.max(1)
30 }
31 @@ -54,4 +57,7 @@
32 if old_h == 0 || new_h == 0 { return true; }
33 + if 400u64 * new_h as u64 >= old_h as u64 * u64::from(u32::MAX) { return true; }
34 +
35 let result = super::resize_dimensions(400, old_h, ::std::u32::MAX, new_h, false);
36 - result.1 == new_h && result.0 == (400 as f64 * new_h as f64 / old_h as f64) as u32
37 + let exact = (400 as f64 * new_h as f64 / old_h as f64) as u32;
38 + result.1 == new_h && result.0 == exact.max(1)
39 }
+0
-26
src/image/debian/patches/relax-dep.diff less more
0 Index: image/Cargo.toml
1 ===================================================================
2 --- image.orig/Cargo.toml
3 +++ image/Cargo.toml
4 @@ -76,7 +76,7 @@ optional = true
5 version = "0.1.32"
6
7 [dependencies.num-rational]
8 -version = "0.3"
9 +version = "0.4"
10 default-features = false
11
12 [dependencies.num-traits]
13 @@ -111,10 +111,10 @@ version = "0.3"
14 version = "0.3"
15
16 [dev-dependencies.num-complex]
17 -version = "0.3"
18 +version = "0.4"
19
20 [dev-dependencies.quickcheck]
21 -version = "0.9"
22 +version = "1.0"
23
24 [features]
25 avif = ["avif-encoder"]
0 relax-dep.diff
10 #png-0.17.patch disabled for now, may be ressurected later if png gets updated to 0.17 before image gets a new upstream version.
21 disable-tests-missing-testdata.patch
32 disable-criterion.diff
4 fix-tests-quickcheck-1.patch
53 disable-features.diff
6 avoid-test-overflow-32-bit.patch