jcelaya / hdrmerge

HDR exposure merging
http://jcelaya.github.io/hdrmerge/
Other
354 stars 78 forks source link

libraw supported raw files extension not loadable throught the file loading dialog #218

Open giovariot opened 1 year ago

giovariot commented 1 year ago

I've noticed that in src/LoadOptionsDialog.cpp there are only the following extensions supported by the load dialog:

void LoadOptionsDialog::addFiles() {
    QSettings settings;
    QVariant lastDirSetting = settings.value("lastOpenDirectory");
    QString filter(tr("Raw images ("
    "*.3fr "
    "*.ari *.arw "
    "*.bay "
    "*.crw *.cr2 *.cap "
    "*.dcs *.dcr *.dng *.drf "
    "*.eip *.erf "
    "*.fff "
    "*.iiq "
    "*.k25 *.kdc "
    "*.mdc *.mef *.mos *.mrw "
    "*.nef *.nrw "
    "*.obm *.orf "
    "*.pef *.ptx *.pxn "
    "*.r3d *.raf *.raw *.rwl *.rw2 *.rwz "
    "*.sr2 *.srf *.srw "
    "*.x3f"
    ")"));

A few more file extensions are compatible with the libraw backend, and adding support for those is apparently really easy. I've tried adding the .qtk extension to this list in LoadOptionsDialog.cpp and recompiled hdrmerge and with the recompiled version I successfully opened a file and even saved a dng from it.

Apparently a more complete list of libraw supported extensions can be found on the android sources repository

Extension() {
    static const char *raw_extensions = 
        "bay,"   // Casio Digital Camera Raw File Format.
        "bmq,"   // NuCore Raw Image File.
        "cr2,"   // Canon Digital Camera RAW Image Format version 2.0. These images are based on the TIFF image standard.
        "crw,"   // Canon Digital Camera RAW Image Format version 1.0. 
        "cs1,"   // Capture Shop Raw Image File.
        "dc2,"   // Kodak DC25 Digital Camera File.
        "dcr,"   // Kodak Digital Camera Raw Image Format for these models: Kodak DSC Pro SLR/c, Kodak DSC Pro SLR/n, Kodak DSC Pro 14N, Kodak DSC PRO 14nx.
        "dng,"   // Adobe Digital Negative: DNG is publicly available archival format for the raw files generated by digital cameras. By addressing the lack of an open standard for the raw files created by individual camera models, DNG helps ensure that photographers will be able to access their files in the future. 
        "erf,"   // Epson Digital Camera Raw Image Format.
        "fff,"   // Imacon Digital Camera Raw Image Format.
        "hdr,"   // Leaf Raw Image File.
        "k25,"   // Kodak DC25 Digital Camera Raw Image Format.
        "kdc,"   // Kodak Digital Camera Raw Image Format.
        "mdc,"   // Minolta RD175 Digital Camera Raw Image Format.
        "mos,"   // Mamiya Digital Camera Raw Image Format.
        "mrw,"   // Minolta Dimage Digital Camera Raw Image Format.
        "nef,"   // Nikon Digital Camera Raw Image Format.
        "orf,"   // Olympus Digital Camera Raw Image Format.
        "pef,"   // Pentax Digital Camera Raw Image Format.
        "pxn,"   // Logitech Digital Camera Raw Image Format.
        "raf,"   // Fuji Digital Camera Raw Image Format.
        "raw,"   // Panasonic Digital Camera Image Format.
        "rdc,"   // Digital Foto Maker Raw Image File.
        "sr2,"   // Sony Digital Camera Raw Image Format.
        "srf,"   // Sony Digital Camera Raw Image Format for DSC-F828 8 megapixel digital camera or Sony DSC-R1
//      "x3f,"   // Sigma Digital Camera Raw Image Format for devices based on Foveon X3 direct image sensor.
        "arw,"   // Sony Digital Camera Raw Image Format for Alpha devices.
        "3fr,"   // Hasselblad Digital Camera Raw Image Format.
        "cine,"  // Phantom Software Raw Image File.
        "ia,"    // Sinar Raw Image File.
        "kc2,"   // Kodak DCS200 Digital Camera Raw Image Format.
        "mef,"   // Mamiya Digital Camera Raw Image Format.
        "nrw,"   // Nikon Digital Camera Raw Image Format.
        "qtk,"   // Apple Quicktake 100/150 Digital Camera Raw Image Format.
        "rw2,"   // Panasonic LX3 Digital Camera Raw Image Format.
        "sti,"   // Sinar Capture Shop Raw Image File.
        "drf,"   // Kodak Digital Camera Raw Image Format.
        "dsc,"   // Kodak Digital Camera Raw Image Format.
        "ptx,"   // Pentax Digital Camera Raw Image Format.
        "cap,"   // Phase One Digital Camera Raw Image Format.
        "iiq,"   // Phase One Digital Camera Raw Image Format.
        "rwz";   // Rawzor Digital Camera Raw Image Format.
    return raw_extensions;
}