You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding use of image_hasher to my project and bumping my image version to get the Image trait to line up, I started having all the worker threads in my indexing runs quickly dying to etemesi254/zune-image#184.
Given that the author of that crate hasn't yet responded to the three-days-ago request to backport the fix from 0.5.0-rc0 to the 0.4.x line which image 0.25 depends on, I'll leave it up to you to decide how to address this.
(Since my data flow has image_hasher as the last thing that consumes the image data and I'd rather not comment out the BitOrder parts of my code to store the generation parameters alongside the hashes, my workaround is just to use image 0.24 for loading images and then also depend on a copy of image 0.25 with no features enabled and do a non-copying hand-off of the decoded pixel data to it to make the types line up.)
// Hand off so we can use the un-panic-y JPEG loader from image 0.24 with a newer image_hasherlet image: image_025::ImageBuffer<image_025::Rgba<u8>,_> =
image_025::ImageBuffer::from_raw(width, height, img_rgba8.into_raw()).expect("Handed image data off from image 0.24 to image 0.25");// In debug builds, save the handed off data, re-load it with image 0.24, and check for// equality to ensure the hand-off didn't do something like get the byte order wrong.#[cfg(debug_assertions)]{letmut tbytes:Vec<u8> = Vec::new();
image.write_to(&mutCursor::new(&mut tbytes), image_025::ImageFormat::Png)?;let img2 =
ImageReader::new(Cursor::new(tbytes)).with_guessed_format()?.decode()?.into_rgba8();assert!(image.as_raw() == img2.as_raw());}let perceptual_hash = hasher.hash_image(&image);trace!(" Image Hash: {}", perceptual_hash.to_base64());
The text was updated successfully, but these errors were encountered:
Your solution is better since there are other critical regressions in zune-jpeg that aren't even resolved yet. Fixing that one just meant I ran into this one non-stop: etemesi254/zune-image#202
After adding use of
image_hasher
to my project and bumping myimage
version to get theImage
trait to line up, I started having all the worker threads in my indexing runs quickly dying to etemesi254/zune-image#184.Given that the author of that crate hasn't yet responded to the three-days-ago request to backport the fix from
0.5.0-rc0
to the 0.4.x line whichimage
0.25 depends on, I'll leave it up to you to decide how to address this.(Since my data flow has image_hasher as the last thing that consumes the image data and I'd rather not comment out the
BitOrder
parts of my code to store the generation parameters alongside the hashes, my workaround is just to useimage
0.24 for loading images and then also depend on a copy ofimage
0.25 with no features enabled and do a non-copying hand-off of the decoded pixel data to it to make the types line up.)The text was updated successfully, but these errors were encountered: