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

escho

  • Contributor
  • Hero Member
  • *****
  • Posts: 552
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: 12258
  • Emergencies only
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.

escho

  • Contributor
  • Hero Member
  • *****
  • Posts: 552
Re: cr2hdr in linux: dcraw could not open this file
« Reply #2 on: April 20, 2019, 08:38:04 PM »
I overlooked your answer. Sorry for that. (Looks like something was wrong with the notificationes...)

Yes, I remember, that there was a problem with the 600D and dualiso. I didn´t realize, that this can be the problem with the 6D too. I will test this and report back.

escho

  • Contributor
  • Hero Member
  • *****
  • Posts: 552
Re: cr2hdr in linux: dcraw could not open this file
« Reply #3 on: April 20, 2019, 09:20:44 PM »
Yes, decoding work with the language-trick. I get some perl-errors, but it works:

Code: [Select]
edgar@linux-vohs:~/Bilder/neu12/dualiso> LANG=en LC_CTYPE=en LANGUAGE=en ./cr2hdr IMG_3151.CR2
cr2hdr: a post processing tool for Dual ISO images

Last update: 185da25 on 2018-02-04 22:52:42 UTC by Dan:
Find the latest version of exiftool.

Active options:
--amaze-edge    : use a temporary demosaic step (AMaZE) followed by edge-directed interpolation (default)
--cs2x2         : apply 2x2 chroma smoothing in noisy and aliased areas (default)
--wb=graymax    : set AsShotNeutral by maximizing the number of gray pixels (default)

Input file      : IMG_3151.CR2
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en",
        LC_ALL = (unset),
        LC_CTYPE = "en",
        LANG = "en"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

At the moment, I´m fighting to get my telescope running on openSUSE Tumbleweed with kstars and indi-drivers. (Problems with the motorfocus ...). if I´ve solved my telescope-problems, I will have a look into cr2hdr.c. Nor sure, I can do something, but I will try :)

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 1278
Re: cr2hdr in linux: dcraw could not open this file
« Reply #4 on: April 21, 2019, 10:13:05 AM »
I overlooked your answer. Sorry for that. (Looks like something was wrong with the notificationes...)
Hej... I am not alone. Since february I don't get any notifications from this forum, but they are enabled.
5D2.212 | EOSM.202