Repository navigation
Preserve aspect ratio when exported frames change size - #615
Breakthrough merged 2 commits into
Conversation
Breakthrough
left a comment
There was a problem hiding this comment.
Thanks for the PR. Note there's some pyright issues you need to address before this can be landed, can you take a look and address those? Also can we add a changelog entry for this?
Re: the pyright issue I think we can just assert that the decoded image is not None in the test you added before we read .shape.
|
Updated in 168068d. The test now asserts that each exported image decodes before it reads Locally, pyright 1.1.414 now gives the same result as |
168068d to
cdf6a44
Compare
|
Thanks for the PR! |
With
save_images(threading=False, width=80), a video that changes from 160 × 80 to 160 × 120 produces two 80 × 40 images. The second image should be 80 × 60. In the single-threaded path, the inferred height becomes the requested height for the rest of the export. Setting onlyheightcauses the same problem with the inferred width.Use the resize helper already called by the threaded path so each frame infers its own missing dimension.
Validation
mainand pass with this change.width=80.tests/test_output.py. Ruff lint and formatting passed.AI tools assisted with investigation and implementation.