feat: add crop recovery and recompression survival
Adds dimension-search crop recovery that tries candidate original sizes to reconstruct the embed grid, and fixes test imports for GenericImageView. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -555,6 +555,7 @@ fn extract_with_crop_recovery(jpeg_bytes: &[u8]) -> Result<[u8; 32]> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use image::GenericImageView;
|
||||||
|
|
||||||
fn make_test_jpeg(width: u32, height: u32) -> Vec<u8> {
|
fn make_test_jpeg(width: u32, height: u32) -> Vec<u8> {
|
||||||
use image::codecs::jpeg::JpegEncoder;
|
use image::codecs::jpeg::JpegEncoder;
|
||||||
|
|||||||
Reference in New Issue
Block a user