fast image operations
track caller
bendn 13 days ago
parent 2edce8d · commit f92f4d8
-rw-r--r--src/dyn/mod.rs2
-rw-r--r--src/lib.rs1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/dyn/mod.rs b/src/dyn/mod.rs
index 5c93720..4d53c01 100644
--- a/src/dyn/mod.rs
+++ b/src/dyn/mod.rs
@@ -154,6 +154,7 @@ impl<T: AsRef<[u8]>> DynImage<T> {
impl DynImage<Box<[u8]>> {
#[cfg(feature = "save")]
+ #[track_caller]
/// Open a PNG image
pub fn open(f: impl AsRef<std::path::Path>) -> Self {
use png::Transformations as T;
@@ -174,6 +175,7 @@ impl DynImage<Box<[u8]>> {
}
#[cfg(feature = "save")]
+ #[track_caller]
/// Save this image to a PNG.
pub fn save(&self, f: impl AsRef<std::path::Path>) {
let p = std::fs::File::create(f).unwrap();
diff --git a/src/lib.rs b/src/lib.rs
index 5668841..97d7b7f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -954,6 +954,7 @@ where
[(); { (CHANNELS <= 4) as usize } - 1]:,
{
#[cfg(feature = "save")]
+ #[track_caller]
/// Open a PNG image
pub fn open(f: impl AsRef<std::path::Path>) -> Self {
let p = std::fs::File::open(f).unwrap();