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

Add support for Canon CR3 raw files #2170

Closed
konig12 opened this issue Mar 8, 2019 · 158 comments
Closed

Add support for Canon CR3 raw files #2170

konig12 opened this issue Mar 8, 2019 · 158 comments
Labels
scope: camera support adding WB and raw support for new cameras
Milestone

Comments

@konig12
Copy link

konig12 commented Mar 8, 2019

Canon CR3 raw files are currently not supported. These are used by a few of Canon's new cameras at this point. At a minimum, the M50, SX70 HS, EOS R, and EOS RP. https://raw.pixls.us/ has samples for the M50, EOS R, and EOS RP.

Someone appears to have already done a lot of the reverse engineering here:
https://github.com/lclevy/canon_cr3

Let me know if there is anything that can be done to help, including testing, more samples, or development assistance.

@DawidLoubser
Copy link
Contributor

I just wanted to add that I have also uploaded sampler RAW and C-RAW from an EOS R - and I would do anything else in my power to help support the efforts to reverse-engineer the CR3 format and get it into Darktable.

@galandras12
Copy link

C-RAW (*.CR3) use Canon 250D so i need support too.
+now use Canon 90D & M6 mark ii (native use CRAW)

@arigit
Copy link
Contributor

arigit commented Dec 25, 2019

On the ongoing effort to reverse-engineer the proprietary CR3 format: https://github.com/lclevy/canon_cr3

@tim-hilt
Copy link

cr3-support is now available in LibRaws master-branch.

@DawidLoubser
Copy link
Contributor

That is fantastic news!! Well done to all that helped!

@github-actions
Copy link

github-actions bot commented Mar 6, 2020

This issue did not get any activity in the past 30 days and will be closed in 7 days if no update occurs. Please check if the master branch has fixed it since then.

@utdemir
Copy link

utdemir commented Mar 6, 2020

Nope, still not solved in master.

@carloszacu
Copy link

I have a Canon EOS Rebel SL3 (also known as EOS 250D and EOS Kiss X10) and I still can´t get my files read by DarkTable, I had to use the Adobe DNG Converter to make the files usable with the app but still no direct support, highly interested in this compatibility, if you need any sample shots or something I would love to help.

@JackSwett
Copy link

For those needing a workaround, you can use Adobe's DNG converter https://helpx.adobe.com/photoshop/using/adobe-dng-converter.html

Obviously native support would be very much appreciated!

@RReverser
Copy link

Yup, also using DNG converter, but, particularly with C-RAW files, having to decompress them just for post-processing really bloats the disk.

@isolin
Copy link

isolin commented Jul 12, 2020

There is no Linux version of DNG Converter 👎 I have to take RAW+JPEG and stick with JPEGs for now, hoping that one day I will be able to process the RAWs in Darktable (being my favourite tool). At least RawTherapee added limited support recently. It's a shame Adobe ignores Linux, it's a shame they don't opensource the CR3 specification and I seriously blame them for not warning their customers :(

@RReverser
Copy link

FWIW there is a reverse-engineering spec here https://github.com/lclevy/canon_cr3 as well as the mentioned earlier support in other libraries like LibRAW, but, my understanding is that devs are mainly concerned about legality of using a reverse-engineered spec?

I wonder how LibRAW deals with this issue? (if it does)

@johnny-bit
Copy link
Member

We know :) Pretty much CR3 is possible, just needs exiv2 support and it's stalled on exiv2 supporting it.

@1div0
Copy link
Contributor

1div0 commented Jul 12, 2020

Almost one year already. The speed of Open Sauce development is incredible.

@johnny-bit
Copy link
Member

@1div0:

Almost one year already. The speed of Open Sauce development is incredible.

Has Canon released non-NDA specs for CR3? Has Canon cleared open source of any possible patent infrigment? Had nobody objected to CR3 support being done in exiv2? Have you contacted Canon and asked them to provide (or at least open line of communication) specs?

Anyway, slowdown on exiv2 side is mostly caused by exiv2 community-member(s) objecting to including possibly patent infringing code (it wouldn't be, I asked law advisor) and thus halting development and discouraging it. I thought I could work on it, but life & paying bills got in the way so I hope Mr. Mills or somebody else will be able to implement relevant stuff on exiv2 side. On darktable's side support is possible as it currently resides on experimental branch (no, that can't be enabled without exiv2 working)

@RReverser
Copy link

RReverser commented Jul 12, 2020

I wonder if, as a workaround, Darktable could provide LibRAW support in form of a plugin? I know it used to use LibRAW in the past, and then switched to custom decoder for performance reasons (I think?), but could LibRAW at least be used as a fallback for unsupported formats so that it would solve cases like this until a better version is available?

@mathbagu
Copy link

I'm also interested in the support of CR3 in darktable. Can anyone give us a status? How can we help?

@SebastianPfliegel
Copy link

There is no Linux version of DNG Converter 👎 I have to take RAW+JPEG and stick with JPEGs for now, hoping that one day I will be able to process the RAWs in Darktable (being my favourite tool). At least RawTherapee added limited support recently. It's a shame Adobe ignores Linux, it's a shame they don't opensource the CR3 specification and I seriously blame them for not warning their customers :(

@isolin the Adobe converter works flawless using Wine. Not the best solution, but works for me in the meantime.

@daniel-lucio
Copy link

For those impatient:
https://inside-out.xyz/technology/editing-cr3-canon-raw-format-with-darktable-on-linux.html

Note that I save in RAW not cRAW.

@RReverser
Copy link

Note that solution from @daniel-lucio is also converting to DNG, like couple others in the thread. It's not a support in Darktable.

@daniel-lucio
Copy link

Note that solution from @daniel-lucio is also converting to DNG, like couple others in the thread. It's not a support in Darktable.

I know, that's why I said for the impatient.

@aurelienpierre
Copy link
Member

Closing here, there is a similar feature request open on Rawspeed project, and Exiv2 is the sole responsible for that lack of support.

@groovenectar
Copy link

It would seem that Linux users are going to be having the comparatively hardest time uninstalling this thing if they ever wanted to, not to suggest that they ever should... but is there any input on potentially packaging DarkTable for Linux? Preferences?

@goeland86
Copy link

goeland86 commented Sep 27, 2021

It would seem that Linux users are going to be having the comparatively hardest time uninstalling this thing if they ever wanted to, not to suggest that they ever should... but is there any input on potentially packaging DarkTable for Linux? Preferences?

I think appimage or snap are probably the more ubiquitous ways of packaging that make it easy. Appimage can also be updated, the way freecad was doing it with appimage updater, so the user doesn't need to pull a whole new image for every new version.

@groovenectar
Copy link

What do you have against Flathub? Simply that you use Snap instead?

I agree about .AppImage

@goeland86
Copy link

What do you have against Flathub? Simply that you use Snap instead?

Actually I just forgot about that option 😅
Honestly I think any of the 3 mentioned is viable for pre release versions. I would go with what's easier to put together and maintain.

@piratenpanda
Copy link
Contributor

May I suggest moving this discussion to https://discuss.pixls.us/

@groovenectar
Copy link

groovenectar commented Sep 27, 2021

May I suggest moving this discussion to https://discuss.pixls.us/

Sorry, is that a company behind DarkTable?

@piratenpanda
Copy link
Contributor

No but thats the "official" forum for all things open source photography including darktable.

@jordan-bonecutter
Copy link

Seriously, any reason why cytrinox/rawspeed can't be merged? Willing to help w/ this effort

@TurboGit
Copy link
Member

I don't have the answer to this, but for sure if cytrinox/rawspeed is not merged soon dt 3.8 won't support CR3.

@jordan-bonecutter
Copy link

I don't have the answer to this, but for sure if cytrinox/rawspeed is not merged soon dt 3.8 won't support CR3.

Bummer, I'm able to build myself with CR3 support but it's certainly a pain! Would be so great if it were offered out of the box

@paolobenve
Copy link
Contributor

I can help, according to my skills. What can I do in order to get this accomplished?

@arduinomaltster
Copy link

I'm trying geoland86's steps to try to get cr3 files working but git checkout canon_cr3 returns "did not match any file(s) known to git" any suggestions.

Somewhat of a noob but trying damn hard to make this work.

@piratenpanda
Copy link
Contributor

I think the process has been mentioned here often enough I'd say. Look for older posts above

@jordan-bonecutter
Copy link

I'm trying geoland86's steps to try to get cr3 files working but git checkout canon_cr3 returns "did not match any file(s) known to git" any suggestions.

Somewhat of a noob but trying damn hard to make this work.

Make sure you remove the raw speed directory and replace it with cytrinox/rawspeed. The cr3 branch is in that repo

@groovenectar
Copy link

groovenectar commented Oct 28, 2021

I'm trying geoland86's steps

Can you link to the specific steps? I don't see this username in the thread from a page search

Edit, found it: #2170 (comment)

@arduinomaltster
Copy link

Looks like that was it. Removed rawspeed directory that was there and cloned from cytrinox/rawspeed repo and was able to get checkout canon_cr3 branch. Fingers crossed on the exiv2. I built with bmff enabled before cloning darktable. Do I need to change anything in the DT directory for exiv2 or will it used the version installed?

@arduinomaltster
Copy link

error with exiv2. Any suggestions?

darktable/src/common/exif.cc: In function ‘char* dt_exif_xmp_read_string(int)’:
/home/swaine/darktable/src/common/exif.cc:3790:53: error: ‘Exiv2::byte* Exiv2::DataBuf::pData_’ is private within this context
3790 | xmpPacket.assign(reinterpret_cast<char *>(buf.pData_), buf.size_);
| ^~~~~~
compilation terminated due to -Wfatal-errors.

I feel like i'm so close. latest version of exiv2 installed but i get [swaine@fedora build]$ exiv2 --version
exiv2 1.0.0.9

@paolobenve
Copy link
Contributor

The api changed in latrst version, you must use 0.27 maintenance branch

@jordan-bonecutter
Copy link

error with exiv2. Any suggestions?

darktable/src/common/exif.cc: In function ‘char* dt_exif_xmp_read_string(int)’:

/home/swaine/darktable/src/common/exif.cc:3790:53: error: ‘Exiv2::byte* Exiv2::DataBuf::pData_’ is private within this context

3790 | xmpPacket.assign(reinterpret_cast<char *>(buf.pData_), buf.size_);

  |                                                     ^~~~~~

compilation terminated due to -Wfatal-errors.

I feel like i'm so close. latest version of exiv2 installed but i get [swaine@fedora build]$ exiv2 --version

exiv2 1.0.0.9

I had that, just removed the private and it worked 😎

@arduinomaltster
Copy link

Well im pretty sure I fixe the exiv2 issue now im getting this lol.

home/swaine/darktable/src/common/imageio_rawspeed.cc: In function ‘dt_imageio_retval_t dt_imageio_open_rawspeed(dt_image_t*, const char*, dt_mipmap_buffer_t*)’: /home/swaine/darktable/src/common/imageio_rawspeed.cc:133:24: error: no matching function for call to ‘rawspeed::RawParser::RawParser(std::unique_ptr<const rawspeed::Buffer>::pointer)’ 133 | RawParser t(m.get()); | ^

I built before without an error from rawspeed. Thanks for the comments on exiv2. Any thoughts?

@jordan-bonecutter
Copy link

Well im pretty sure I fixe the exiv2 issue now im getting this lol.

`home/swaine/darktable/src/common/imageio_rawspeed.cc: In function ‘dt_imageio_retval_t dt_imageio_open_rawspeed(dt_image_t*, const char*, dt_mipmap_buffer_t*)’:

/home/swaine/darktable/src/common/imageio_rawspeed.cc:133:24: error: no matching function for call to ‘rawspeed::RawParser::RawParser(std::unique_ptr::pointer)’

133 | RawParser t(m.get());

  |                        ^

`

I built before without an error from rawspeed. Thanks for the comments on exiv2. Any thoughts?

Rebuild entirely (remove build directory and start from scratch)

@parafin
Copy link
Member

parafin commented Oct 29, 2021

@TurboGit, we should consider locking this issue, because it turned into support forum, too much noise. There's nothing to discuss about the feature itself, just waiting for rawspeed.

@arduinomaltster
Copy link

moving the issue to Pixl. Thank you all for the support.

@svenakela
Copy link

Good thought. I've added more input here.
https://discuss.pixls.us/t/darktable-ubuntu-cr3-support/

@darktable-org darktable-org locked as off-topic and limited conversation to collaborators Nov 4, 2021
@TurboGit
Copy link
Member

TurboGit commented Nov 4, 2021

@TurboGit, we should consider locking this issue, because it turned into support forum, too much noise. There's nothing to discuss about the feature itself, just waiting for rawspeed.

Locked now.

@Nilvus Nilvus added this to the 3.8 milestone Nov 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: camera support adding WB and raw support for new cameras
Projects
Status: Resolved
Development

No branches or pull requests