Skip to content

Commit 05c22fe

Browse files
committed
Add benchmark files and update documentation
1 parent 022f1cf commit 05c22fe

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

collector/compile-benchmarks/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ They mostly consist of real-world crates.
3636
- **image-0.24.1**: Basic image processing functions and methods for
3737
converting to and from various image formats. Used often in graphics
3838
programming.
39+
- **image-0.25.6**: Basic image processing functions and methods for
40+
converting to and from various image formats. Used often in graphics
41+
programming.
3942
- **libc-0.2.124**: An interface to `libc`. Contains many declarations of
4043
types, constants, and functions, but relatively little normal code. Stresses
4144
the parser. A very widely-used crate.

collector/compile-benchmarks/REUSE.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ path = "image-0.24.1/**"
135135
SPDX-FileCopyrightText = "The image-rs Developers"
136136
SPDX-License-Identifier = "MIT"
137137

138+
[[annotations]]
139+
path = "image-0.25.6/**"
140+
SPDX-FileCopyrightText = "The image-rs Developers"
141+
SPDX-License-Identifier = "MIT"
142+
138143
[[annotations]]
139144
path = "inflate/**"
140145
SPDX-FileCopyrightText = "inflate contributors"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/src/dynimage.rs b/src/dynimage.rs
2+
index 32da8c70..10e46ec2 100644
3+
--- a/src/dynimage.rs
4+
+++ b/src/dynimage.rs
5+
@@ -1348,6 +1348,7 @@ pub fn load_from_memory(buffer: &[u8]) -> ImageResult<DynamicImage> {
6+
/// [`load`]: fn.load.html
7+
#[inline(always)]
8+
pub fn load_from_memory_with_format(buf: &[u8], format: ImageFormat) -> ImageResult<DynamicImage> {
9+
+ println!("testing");
10+
let b = io::Cursor::new(buf);
11+
free_functions::load(b, format)
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"runs": 1,
3+
"artifact": "library",
4+
"category": "primary"
5+
}

0 commit comments

Comments
 (0)