-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for ARW, DNG, CR2 raw #140
Merged
yurijmikhalevich
merged 12 commits into
yurijmikhalevich:main
from
abidkhan484:support-arw-image-format
Nov 3, 2024
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5f7a807
raw format parsing added for arw, dng, cr2 yurijmikhalevich/rclip#15
abidkhan484 097f9df
image extension prioritization added yurijmikhalevich/rclip#15
abidkhan484 f5a569c
read image according to extension yurijmikhalevich/rclip#15
abidkhan484 8e5b675
Update pyproject.toml
yurijmikhalevich 679ba48
update rawpy
yurijmikhalevich 45a582f
revert rclip/fs.py to main
yurijmikhalevich 12608f5
fix raw support
yurijmikhalevich 7a30174
fix awkward exception handling
yurijmikhalevich 46f2fc8
ensure rclip can preview RAW images
yurijmikhalevich d053f39
cleanup + disable DNG support
yurijmikhalevich af93ae4
better read_image
yurijmikhalevich cc2603e
make linter happy
yurijmikhalevich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an amazing start 🙌 Thank you. Can you please add a test or two that includes all of the newly added image formats?
When adding test images, can you please pick or create RAW files that weigh as little as possible to keep the repo size small?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have downloaded the raw images from internet that have relatively larger file sizes (about 10 to 40 MB). I also searched conversion tools and tried to convert using Python libraries. But it didn't work.
Adding these larger images could increase the tool size. What is your opinion regarding this sized image upload to the test folder? @yurijmikhalevich
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abidkhan484, I think adding 3 10Mb images to the repository can be ok. We aren't bundling them in the distributions anyway.
But, if we can create 3 small 100px * 100px RAW images, it would be much better.
Also, when adding images, we should be mindful of their license. All of the images in the rclip test dir are the images I took myself 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yurijmikhalevich, I have tried to resize or convert images. But I failed. So, It's difficult for me to add different raw photos. But I can download some raw images from the internet those sizes on average 40MB. Need your suggestion badly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abidkhan484, let me see what I can do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abidkhan484, I am going to cleanup and merge your branch, and then will add tests in a separate PR.
I can't add it in this PR because GitHub and
git-lfs
don't let me push large images to your branch (-:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abidkhan484, another important thing to do in this PR was to ensure that the
--preview
works for the RAW images. Check out this diff for implementation: 46f2fc8.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Also, it doesn't actually support "DNG" files created by Lightroom. This is why tests are important 💭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abidkhan484, merged! 🙌 Congrats with your first contribution to rclip and thank you for the help 🔥