Author Topic: cr2hdr in linux: dcraw could not open this file  (Read 122 times)

escho

  • Hero Member
  • *****
  • Posts: 541
cr2hdr in linux: dcraw could not open this file
« on: March 24, 2019, 09:18:41 PM »
Running openSUSE Tumbleweed here.

It´s a couple of years ago, that I worked with dualiso-files on my old 600D. If I remember right, I didn´t have big problems to get this running. Now I did some dualiso-shoots with my 6D. But trying to decode them with cr2hdr didnt´t succeed. I got an error: dcraw could not open this file
But opening this dualiso-file with dcraw dirctly results in a ppm. that means, dcraw can open the file.
So I´m wondering, what´s going in here?

First a screenshot from what I did:

https://seescho.files.wordpress.com/2019/03/cr2hdr.jpeg

Next try: I cloned MagicLantern unified from git and compiled it for the 6D with success. I loaded the new version to the SD-Card of the 6D, initialized the dualiso-modul and took anoter dualiso-shoot. I tried to decode the dualiso-file with the new compiled cr2hdr, but the result was the same: dcraw could not open this file

Now I downloaded cr2hdr in it´s windows-version from ML-Website. I started cr2hdr.exe with wine. the result was fine. The dualiso-file was decoded successfully.

I don´t understand, why the linux-version is not running.

Some hints, where I have to look for the error?

Edgar

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12112
  • 5D Mark Free
Re: cr2hdr in linux: dcraw could not open this file
« Reply #1 on: March 24, 2019, 09:50:52 PM »
First: grep for the error message in modules/dual_iso. That points you to a code sequence like this:
Code: [Select]
        if (raw_width == 0)
        {
            printf("dcraw could not open this file\n");
            continue;
        }

Then, look where raw_width comes from:
Code: [Select]
                r = sscanf(line, "Full size: %d x %d\n", &raw_width, &raw_height);

So, cr2hdr expects the dcraw messages to be in English.

TODO: disable locale settings when invoking external programs from cr2hdr (likely easy).

Pretty sure this error was discussed before, btw.