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:
adlee-was-taken
2026-04-11 23:07:50 -04:00
parent 8e1d7f5358
commit 1e08055d8d

View File

@@ -555,6 +555,7 @@ fn extract_with_crop_recovery(jpeg_bytes: &[u8]) -> Result<[u8; 32]> {
#[cfg(test)]
mod tests {
use super::*;
use image::GenericImageView;
fn make_test_jpeg(width: u32, height: u32) -> Vec<u8> {
use image::codecs::jpeg::JpegEncoder;