image: update to 0.24.3
Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
Fabian Grünbichler
1 year, 7 months ago
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 | ||
0 | 7 | rust-image (0.23.14-2) unstable; urgency=medium |
1 | 8 | |
2 | 9 | * Team upload. |
32 | 32 | FIXME (overlay): These notices are extracted from files. Please review them |
33 | 33 | before uploading to the archive. |
34 | 34 | |
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 | ||
42 | 35 | Files: debian/* |
43 | 36 | Copyright: |
44 | 37 | 2019-2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> |
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 |
1 | 1 | =================================================================== |
2 | 2 | --- image.orig/Cargo.toml |
3 | 3 | +++ image/Cargo.toml |
4 | @@ -23,24 +23,12 @@ readme = "README.md" | |
5 | categories = ["multimedia::images", "multimedia::encoding"] | |
4 | @@ -31,25 +31,12 @@ categories = [ | |
6 | 5 | license = "MIT" |
7 | 6 | repository = "https://github.com/image-rs/image" |
7 | resolver = "2" | |
8 | 8 | +autobenches = false |
9 | 9 | |
10 | 10 | [lib] |
24 | 24 | -[[bench]] |
25 | 25 | -name = "copy_from" |
26 | 26 | -harness = false |
27 | - | |
27 | 28 | [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 | |
31 | 32 | [dev-dependencies.crc32fast] |
32 | 33 | version = "1.2.0" |
33 | 34 |
1 | 1 | =================================================================== |
2 | 2 | --- image.orig/Cargo.toml |
3 | 3 | +++ image/Cargo.toml |
4 | @@ -38,14 +38,6 @@ version = "1.3.2" | |
4 | @@ -47,14 +47,6 @@ version = "1.3.2" | |
5 | 5 | [dependencies.color_quant] |
6 | 6 | version = "1.1" |
7 | 7 | |
10 | 10 | -optional = true |
11 | 11 | - |
12 | 12 | -[dependencies.dcv-color-primitives] |
13 | -version = "0.1.16" | |
13 | -version = "0.4.0" | |
14 | 14 | -optional = true |
15 | 15 | - |
16 | 16 | [dependencies.gif] |
17 | 17 | version = "0.11.1" |
18 | 18 | optional = true |
19 | @@ -56,10 +48,6 @@ optional = true | |
19 | @@ -65,10 +57,6 @@ optional = true | |
20 | 20 | default-features = false |
21 | 21 | package = "jpeg-decoder" |
22 | 22 | |
23 | 23 | -[dependencies.mp4parse] |
24 | -version = "0.11.5" | |
24 | -version = "0.12.0" | |
25 | 25 | -optional = true |
26 | 26 | - |
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" | |
32 | 32 | optional = true |
33 | 33 | |
34 | 34 | -[dependencies.ravif] |
35 | -version = "0.6.0" | |
35 | -version = "0.8.0" | |
36 | 36 | -optional = true |
37 | 37 | - |
38 | 38 | -[dependencies.rgb] |
42 | 42 | [dependencies.scoped_threadpool] |
43 | 43 | version = "0.1" |
44 | 44 | 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" | |
50 | 47 | |
51 | 48 | [features] |
52 | 49 | -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 | -] | |
55 | 59 | benchmarks = [] |
56 | 60 | bmp = [] |
57 | 61 | 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 | ] | |
59 | 68 | dxt = [] |
60 | 69 | farbfeld = [] |
61 | hdr = ["scoped_threadpool"] | |
62 | ico = ["bmp", "png"] | |
70 | @@ -153,11 +122,6 @@ ico = [ | |
71 | "png", | |
72 | ] | |
63 | 73 | jpeg_rayon = ["jpeg/rayon"] |
74 | -openexr = ["exr"] | |
64 | 75 | pnm = [] |
76 | tga = [] | |
77 | webp = [] | |
78 | - | |
79 | -[target."cfg(target_endian = \"little\")".dependencies.exr] | |
80 | -version = "1.4.2" | |
81 | -optional = true |
1 | 1 | =================================================================== |
2 | 2 | --- image.orig/src/codecs/bmp/decoder.rs |
3 | 3 | +++ image/src/codecs/bmp/decoder.rs |
4 | @@ -1493,12 +1493,12 @@ mod test { | |
5 | } | |
4 | @@ -1572,13 +1572,13 @@ mod test { | |
6 | 5 | } |
7 | 6 | |
8 | - #[test] | |
9 | + /*#[test] | |
10 | fn read_rect() { | |
7 | #[test] | |
8 | - fn read_rect() { | |
9 | + /*fn read_rect() { | |
11 | 10 | let f = std::fs::File::open("tests/images/bmp/images/Core_8_Bit.bmp").unwrap(); |
12 | 11 | let mut decoder = super::BmpDecoder::new(f).unwrap(); |
13 | 12 | |
15 | 14 | decoder.read_rect(0, 0, 8, 8, &mut *buf).unwrap(); |
16 | 15 | - } |
17 | 16 | + }*/ |
18 | } | |
17 | ||
18 | #[test] | |
19 | fn read_rle_too_short() { | |
19 | 20 | Index: image/src/codecs/png.rs |
20 | 21 | =================================================================== |
21 | 22 | --- image.orig/src/codecs/png.rs |
22 | 23 | +++ 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}; | |
26 | 27 | |
27 | 28 | - #[test] |
28 | 29 | + /*#[test] |
29 | 30 | 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 { | |
33 | 34 | .collect::<Vec<u8>>(); |
34 | 35 | |
35 | 36 | assert_eq![6_000_000, correct_bytes.len()]; |
41 | 42 | fn underlying_error() { |
42 | 43 | use std::error::Error; |
43 | 44 | |
44 | @@ -688,5 +688,5 @@ mod tests { | |
45 | .unwrap() | |
45 | @@ -753,6 +753,7 @@ mod tests { | |
46 | 46 | .downcast_ref::<png::DecodingError>() |
47 | 47 | .expect("Caused by a png error"); |
48 | - } | |
49 | + }*/ | |
50 | } | |
48 | } | |
49 | + */ | |
50 | ||
51 | #[test] | |
52 | fn encode_bad_color_type() { | |
51 | 53 | Index: image/src/dynimage.rs |
52 | 54 | =================================================================== |
53 | 55 | --- image.orig/src/dynimage.rs |
54 | 56 | +++ image/src/dynimage.rs |
55 | @@ -1341,7 +1341,7 @@ mod test { | |
57 | @@ -1242,7 +1242,7 @@ mod test { | |
56 | 58 | assert!(super::load_from_memory(b"").is_err()); |
57 | 59 | } |
58 | 60 | |
61 | 63 | #[test] |
62 | 64 | fn image_dimensions() { |
63 | 65 | 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 { | |
66 | 67 | let image = super::open(im_path).unwrap(); |
67 | 68 | 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}; | |
71 | 74 | Index: image/src/imageops/sample.rs |
72 | 75 | =================================================================== |
73 | 76 | --- image.orig/src/imageops/sample.rs |
74 | 77 | +++ image/src/imageops/sample.rs |
75 | @@ -837,7 +837,7 @@ mod tests { | |
78 | @@ -864,7 +864,7 @@ mod tests { | |
76 | 79 | #[cfg(feature = "benchmarks")] |
77 | 80 | use test; |
78 | 81 | |
81 | 84 | #[cfg(all(feature = "benchmarks", feature = "png"))] |
82 | 85 | fn bench_resize(b: &mut test::Bencher) { |
83 | 86 | use std::path::Path; |
84 | @@ -846,7 +846,7 @@ mod tests { | |
87 | @@ -873,7 +873,7 @@ mod tests { | |
85 | 88 | test::black_box(resize(&img, 200, 200, FilterType::Nearest)); |
86 | 89 | }); |
87 | 90 | b.bytes = 800 * 800 * 3 + 200 * 200 * 3; |
90 | 93 | |
91 | 94 | #[test] |
92 | 95 | fn test_issue_186() { |
93 | @@ -854,7 +854,7 @@ mod tests { | |
96 | @@ -881,7 +881,7 @@ mod tests { | |
94 | 97 | let _ = resize(&img, 50, 50, FilterType::Lanczos3); |
95 | 98 | } |
96 | 99 | |
98 | 101 | + /*#[bench] |
99 | 102 | #[cfg(all(feature = "benchmarks", feature = "tiff"))] |
100 | 103 | 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 { | |
103 | 106 | test::black_box(image.thumbnail(256, 256)); |
104 | 107 | }); |
105 | 108 | b.bytes = 193 * 193 * 4 + 256 * 256 * 4; |
111 | 114 | #[cfg(feature = "png")] |
112 | 115 | fn resize_transparent_image() { |
113 | 116 | 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); | |
117 | 119 | } |
118 | - } | |
119 | + }*/ | |
120 | } | |
120 | } | |
121 | + */ | |
122 | ||
123 | #[test] | |
124 | fn bug_1600() { |
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 | 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 | |
1 | 0 | #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. |
2 | 1 | disable-tests-missing-testdata.patch |
3 | 2 | disable-criterion.diff |
4 | fix-tests-quickcheck-1.patch | |
5 | 3 | disable-features.diff |
6 | avoid-test-overflow-32-bit.patch |