Add shot_select support with set_unpack_params() method#276
Merged
Conversation
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
…truct Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for shot_select in Canon RAW files
Add shot_select parameter for multi-image RAW files
Jan 27, 2026
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Copilot
AI
changed the title
Add shot_select parameter for multi-image RAW files
Move shot_select from postprocess to file opening
Jan 27, 2026
letmaik
reviewed
Jan 27, 2026
…lect to open methods Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. |
Copilot
AI
changed the title
Move shot_select from postprocess to file opening
Add shot_select support with set_unpack_params() method
Jan 27, 2026
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.
shot_selectwas incorrectly implemented as a postprocessing parameter. It must be set before unpacking since it controls which RAW image is decoded from multi-image files (e.g., Canon Dual Pixel RAW).Changes
shot_selecttoimread(): High-level API takesshot_selectparameterset_unpack_params()method: New method inRawPyclass for configuring unpack parametersimgdata.rawparams.shot_selectis set after opening, beforeunpack()is calledParamsclass andapply_params()API Change
Before:
After (high-level API):
After (low-level API):
Technical Details
shot_selectlives inimgdata.rawparams(unpacking stage), notimgdata.params(postprocessing stage). The newset_unpack_params()method provides a clean separation between file opening and unpack configuration, making the API more extensible for future unpack parameters. Setting it before unpacking allows LibRaw to properly select the image during decode and correctly error on nonexistent images.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.