Resize Embedded JPEG and Set Maximum File Size

Thank you for developing RawPreviewExtractor. I have been using it to extract the embedded JPEG previews from Canon RAW (CR3) files, and I really like how fast and simple it is.
I would like to suggest adding an option to resize the extracted JPEG and control its file size.
Currently, RawPreviewExtractor extracts the embedded JPEG as-is, at the original preview size. It would be very useful to have the following options:
1. Resize by Long Edge
Add an option such as:

  • Original size
  • Long edge: 6000 px
  • Long edge: 4000 px
  • Long edge: 3000 px
  • Custom size

For example, if the original embedded JPEG is 6000 × 4000, setting the long edge to 3000 px would produce a 3000 × 2000 JPEG.
2. Maximum JPEG File Size
It would also be very useful to have a maximum file size option, for example:

  • No limit
  • 5 MB
  • 3 MB
  • 2 MB
  • 1 MB
  • Custom size

For example:
Long edge: 3000 px
Maximum file size: 2 MB
The program could automatically adjust JPEG quality/compression to keep each output file below approximately 2 MB.
3. Preserve Embedded JPEG Appearance
The most important point for me is that the extracted JPEG should retain the original camera-generated JPEG appearance, including:

  • Picture Style
  • White Balance
  • Camera color rendering
  • Exposure/contrast appearance

I am using Canon EOS R3 CR3 files, and the main reason I use RawPreviewExtractor is that the embedded JPEG already has the camera's JPEG rendering.

Dear Sir:
Our goal is to keep RawPreviewExtractor light, fast, reliable, and focused purely on clean extraction (byte-for-byte extraction of the preview data exactly as the camera wrote it; without any processing / decoding / re-encoding), leaving any downstream modifications completely up to user (ImageMagick?).