Skip to content
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 CR2, DNG, and ARW RAW files #15

Open
2 of 5 tasks
yurijmikhalevich opened this issue Aug 26, 2021 · 7 comments
Open
2 of 5 tasks

feat: add support for CR2, DNG, and ARW RAW files #15

yurijmikhalevich opened this issue Aug 26, 2021 · 7 comments
Assignees
Labels
feat New feature or request good first issue Good for newcomers hacktoberfest priority:high High priority issues

Comments

@yurijmikhalevich
Copy link
Owner

yurijmikhalevich commented Aug 26, 2021

The logic should be:

  • if there is both RAW and JPEG image named the same way in the same directory, then use the JPEG one
  • if there is only the RAW image, then use the RAW image
  • when displaying search results for RAW+JPEG pairs, we may want to output both names (maybe, if the user passed a special flag; need to think about it)

Also, a good question to answer:

  • should RAW support be enabled by default

I am inclined to say "yes," but this would break the use-case when the user passes the rclip output to the image viewer like here rclip -f -t 5 kitty | feh -f - -t and it doesn't support RAW. But I guess it boils down to which kind of images you are working with, and you should be aware that not all viewers open RAW.

  • ARW
  • DNG
  • CR2

Optional:

  • CR3
  • CRW
@yurijmikhalevich yurijmikhalevich added the good first issue Good for newcomers label Aug 26, 2021
@yurijmikhalevich yurijmikhalevich added the feat New feature or request label Sep 4, 2021
@yurijmikhalevich yurijmikhalevich added the priority:low Low priority issues label Nov 17, 2021
@yurijmikhalevich
Copy link
Owner Author

Closing because it's a very low priority. Let me know if you want this :)

@yurijmikhalevich yurijmikhalevich closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2023
@yurijmikhalevich yurijmikhalevich added priority:medium Medium priority issues and removed priority:low Low priority issues labels Jul 2, 2024
@yurijmikhalevich
Copy link
Owner Author

Related discussion: #87

@yurijmikhalevich yurijmikhalevich changed the title feat: add RAW support feat: add support for CR2, DNG, and ARW RAW files Jul 2, 2024
@yurijmikhalevich yurijmikhalevich added priority:high High priority issues and removed priority:medium Medium priority issues labels Jul 2, 2024
@yurijmikhalevich
Copy link
Owner Author

Reopened and bumped priority because it is a popular user-requested feature.

@abidkhan484
Copy link
Contributor

Could you please assign to this issue? @yurijmikhalevich

@yurijmikhalevich
Copy link
Owner Author

yurijmikhalevich commented Sep 30, 2024

@abidkhan484, of course. Thank you for taking this one! Feel free to PR individual RAW format support in separate PRs so we can get them reviewed and merged sooner, and let me know if you have any questions! 😄

abidkhan484 added a commit to abidkhan484/rclip that referenced this issue Oct 2, 2024
@abidkhan484
Copy link
Contributor

Could you advise whether including raw formats in the IMAGE_REGEX constant in the main file is responsible for determining which files will be processed?

@yurijmikhalevich

@yurijmikhalevich
Copy link
Owner Author

@abidkhan484, we can do this, but Pillow, the image processing library we use, can't handle RAW files, so we will need to implement separate RAW file processors (or import a new library) to support new formats.

The logic should be:

  • if there are RAW and JPG with the same name in the same directory, then process the JPG only and ignore the RAW file
  • if there is only a RAW file, then process the RAW file

abidkhan484 added a commit to abidkhan484/rclip that referenced this issue Oct 2, 2024
abidkhan484 added a commit to abidkhan484/rclip that referenced this issue Oct 7, 2024
yurijmikhalevich added a commit that referenced this issue Nov 3, 2024
This pull request for the issue #15 will introduce:

1. Support for RAW file processors.

  - [x] ARW
  - [ ] DNG
- yurij: doesn't actually work with DNG produced by Lightroom, disabled
in this PR
  - [x] CR2

The other raw format should work by adding the extension in the
IMAGE_REGEX constant but the below formats are not yet tested.

  -  CR3
  -  CRW

2. If a RAW file and a JPG file with the same name exist in the same
directory, the logic will prioritize processing the JPG file and ignore
the corresponding RAW file.

---------

Co-authored-by: Yurij Mikhalevich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request good first issue Good for newcomers hacktoberfest priority:high High priority issues
Projects
None yet
Development

No branches or pull requests

2 participants