Skip to content

fix: DNG handling when reading data from filepath directly - #151

Merged
tmathern merged 5 commits into
mainfrom
mathern/dng-special-handling
Aug 29, 2025
Merged

fix: DNG handling when reading data from filepath directly#151
tmathern merged 5 commits into
mainfrom
mathern/dng-special-handling

Conversation

@tmathern

@tmathern tmathern commented Aug 28, 2025

Copy link
Copy Markdown
Collaborator

mimetype module guesses the wrong mimetype for DNG based on extension (it guesses image/jpeg), so for .dng extension we now bypass the check and set it ourselves.

@tmathern
tmathern requested review from dyro and gpeacock August 28, 2025 23:34
@tmathern tmathern self-assigned this Aug 28, 2025
Comment thread tests/test_unit_tests.py

@gpeacock gpeacock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for now, but let's add an issue to move this logic into the rust SDK and c bindings. This should not be language dependent.

Comment thread src/c2pa/c2pa.py Outdated
@tmathern tmathern changed the title fix: DNG handling fix: DNG handling when reading data from filepath directly Aug 28, 2025
@tmathern
tmathern merged commit fbf93bc into main Aug 29, 2025
20 checks passed
@tmathern
tmathern deleted the mathern/dng-special-handling branch August 29, 2025 00:00
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.

2 participants