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

ext/img_display: support raw img preview in kitty #2931

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pkeroulas
Copy link

@pkeroulas pkeroulas commented Jan 3, 2024

ISSUE TYPE

  • Improvement/feature implementation

RUNTIME ENVIRONMENT

  • Operating system and version: Ubuntu 22.04
  • Terminal emulator and version: kitty 0.26.4
    ranger version: ranger 1.9.3
    Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
    Locale: fr_FR.UTF-8

CHECKLIST

  • [ x] The CONTRIBUTING document has been read [REQUIRED]
  • [ x] All changes follow the code style [REQUIRED]
  • [ x] All new and existing tests pass [REQUIRED]
  • Changes require config files to be updated
    • Config files have been updated
  • Changes require documentation to be updated
    • Documentation has been updated
  • Changes require tests to be updated
    • Tests have been updated

DESCRIPTION

Extract and save the thumbnail from raw using rawpy and replace path.

MOTIVATION AND CONTEXT

Raw image can't be previewed since PIL doesn't support them.

TESTING

Provided example is tested with Olympus files (.ORF).

Extract and save the thumbnail from raw using `rawpy` and replace
`path`. Provided example is tested with Olympus files (.ORF).
@markus-bauer
Copy link
Contributor

I'm not a ranger dev, but AFAIK, stuff like this should be done in scope.sh.
Convert the image to a jpg, save as IMAGE_CACHE_PATH, exit with code 6.
That way, all internal image preview methods can use the cache image.

@pkeroulas
Copy link
Author

@markus-bauer thanks for the feedback. Your suggestion works fine.
Do you think a PR worth it or scope.sh is more like a user config?

@markus-bauer
Copy link
Contributor

@pkeroulas
I'm not the one to ask, sorry.
Just keep this PR open and wait for an "official" response. I wouldn't do more work until then.

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.

None yet

2 participants