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

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

Open
giovariot opened this issue Jan 13, 2023 · 1 comment

Comments

@giovariot
Copy link

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;
}
@giovariot
Copy link
Author

I've added a few extensions to the list, adding support for cr3 format and other more obscure raw formats. Don't know how to create a merge request but here is the edited list

(src/LoadOptionsDialog.cpp line 116)

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

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

No branches or pull requests

1 participant