Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #167 with independent minimum JPEG/PNG width, height, pixel count and final file size settings. All four default to zero (disabled), and equality passes.
image_min_width,image_min_height,image_min_pixels, andimage_min_bytes.Example:
Recovery behavior and limits
Preflight uses a 4 KiB cache and bounds work to 16 MiB of reads / 65536 markers or chunks. It stays within the current source extent, limits ext2 preflight before indirect blocks, and leaves brute-force reconstruction to the final stream check. APP2 MPF data does not use the first JPEG EOI as the whole multi-picture size.
Unknown or corrupt dimension metadata preserves normal recovery; it is not treated as zero dimensions. Fragmented/incomplete images or probe-budget exhaustion can therefore require output writes before final rejection, and unknown dimensions are retained according to existing recovery behavior. The byte minimum is checked against the final native recovery size. These behaviors are documented in the manual and test README.
QPhotoRec initializes the added options to disabled; its GUI does not gain controls in this change.
Validation
Built
testdisk,photorec,fidentify, andqphotoreclocally with GCC, ncurses and libjpeg support. Existing compiler warnings remain; the new format parser also compiles with-Wall -Wextra -Werror.Reproducible test commands are in
tests/README.md:fopen.All fixtures are synthetic and all recovery tests use temporary files, not physical disks.
Developed with AI assistance in Codex. The validation described above was run locally on Linux.