Skip to content

Add PhotoRec image minimum filters#207

Closed
gero-studios wants to merge 1 commit into
cgsecurity:masterfrom
gero-studios:photorec-image-minimum-filters-qphotorec
Closed

Add PhotoRec image minimum filters#207
gero-studios wants to merge 1 commit into
cgsecurity:masterfrom
gero-studios:photorec-image-minimum-filters-qphotorec

Conversation

@gero-studios
Copy link
Copy Markdown

Addresses #167.

This adds configurable image minimum filters for PhotoRec:

  • minimum image file size in bytes
  • minimum width and height
  • minimum width multiplied by height
  • JPEG and PNG enforcement paths
  • /cmd option parsing and session save output
  • ncurses PhotoRec options screen controls
  • QPhotoRec controls for the same minimums
  • man page note for the batch option names

I noticed #206 after starting this implementation. This PR is offered as an alternative, mainly because it also exposes the controls in QPhotoRec and checks JPEG dimensions again after validation if the SOF marker was not available in the initial header buffer. If maintainers prefer #206, I am happy to close this.

Verification:

  • git diff --check
  • gcc -fsyntax-only -I src -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_SYS_TYPES_H -DHAVE_SYS_STAT_H -DHAVE_STRING_H -DHAVE_TIME_H -DHAVE_STDLIB_H src/filegen.c src/poptions.c src/photorec.c src/sessionp.c src/phrecn.c src/file_png.c src/file_jpg.c

I could not run the full autotools build in this Windows workspace because generated configure files are not present and the portable toolchain used for verification does not include autotools.

@gero-studios gero-studios deleted the photorec-image-minimum-filters-qphotorec branch May 20, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant