EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Tests: document crop/resize regressions
erythrofrf6222ff5d5c5
diff --git a/crates/export/src/pipeline.rs b/crates/export/src/pipeline.rsindex 7b9e4111c..8e8c90561 100644--- a/crates/export/src/pipeline.rs+++ b/crates/export/src/pipeline.rs@@ -1063,6 +1063,7 @@ mod tests {}}+ /// Regress the locked-aspect example: cropping 1920x1080 must resize to 1280x1440.#[test]fn crop_resize_applies_margins_once() {use effectcraft_project::render_queue::{Crop, OutputModule, Resize};@@ -1077,6 +1078,7 @@ mod tests {assert_eq!(img.data.len(), 1280 * 1440);}+ /// Apply output-module geometry to a synthetic frame without rendering or writing files.fn run_crop_resize(img: Image, output: &effectcraft_project::render_queue::OutputModule, scale: f64) -> Image {use effectcraft_project::render_queue::RenderSettings;let project = Project::default();@@ -1097,6 +1099,7 @@ mod tests {Cx::new(&job).crop_resize(img)}+ /// Match predicted dimensions across crop, padding, ROI scale, aspect locks and resize qualities.#[test]fn crop_resize_dimensions_match_the_output_module() {use effectcraft_project::render_queue::{Crop, OutputModule, Resize};@@ -1124,6 +1127,7 @@ mod tests {}}+ /// Exercise zero/empty inputs, collapsed crops and existing caps on extreme single-axis resizes.#[test]fn crop_resize_zero_and_extreme_sizes_stay_bounded() {use effectcraft_project::render_queue::{Crop, OutputModule, Resize};diff --git a/crates/export/tests/it/render_settings.rs b/crates/export/tests/it/render_settings.rsindex c2d7dcbfa..0fd6d471b 100644--- a/crates/export/tests/it/render_settings.rs+++ b/crates/export/tests/it/render_settings.rs@@ -174,6 +174,8 @@ fn crop_roi_and_resize() {assert_eq!((z.width(), z.height()), (32, 24));}+/// Resizing to the cropped frame's own dimensions must preserve every decoded PNG pixel.+/// Compare against crop-only output for padding and scaled ROIs with both resize qualities.#[test]fn crop_resize_preserves_pixels_when_the_cropped_size_is_requested() {let (p, cid) = project(FrameRate::new(25, 1), |_, _| {});