Krita offers to open CR2 files, but at the end if fails with error "Could not open file: ... Reason: Unknown file type." Sometimes after that all menu items are disabled so I can't even close Krita properly and have to kill it from the OS X application menu bar. Reproducible: Always Steps to Reproduce: 1. File/Open, choose 'All files' or 'Camera raw files', 2. Select the CR2 file to open and confirm. Actual Results: Krita shows the thumbnails not grayed out indicating that the file can be opened. After my attempt to open the file Krita shows an error dialog with the message "Could not open file: <filename> Reason: Unknown file type." Sometimes after that all menu items are disabled so I can't even close Krita properly and have to kill it from the OS X application menu bar. Expected Results: Krita shows the thumbnails not grayed out. Krita opens the file. All menu items are enabled or disabled w.r.t. to the program state. Version: krita3-beta1-8ec9263 Operating system: OS X 10.9.5
Can you attach a sample file? It should work, but I haven't got access to a camera which can produce raw files.
Yes, here is the link to it (it's too big to attach it here as file): https://goo.gl/photos/ukextU4aVvWx6cveA By clicking the i button top right you'll find the image metadata.
I forgot to mention: Lightroom and Darktable 2.0.3 are able to open the file and Krita fails with other CR2 files, too. So I don't assume the file to be broken.
I just tried on Linux (Debian Testing) with the AppImage (krita-3.0-Beta-master-562442e-x86_64.appimage) and opening CR2 files fails here, too. Therefore changing the platform values for this report.
I investigated a bit and a look at the console output gave me some insights. On opening the File/Open dialog, a long list of file format messages is printed out, among them: mimeType "image/x-krita-raw" seen false swap extension order false description: "Camera Raw Files" patterns: ("*.nef", "*.cr2", "*.sr2", "*.crw", "*.pef", "*.x3f", "*.kdc", "*.mrw", "*.arw", "*.k25", "*.dcr", "*.orf", "*.raw", "*.raw", "*.raf", "*.srf", "*.dng") >>>>>>>>>>>>>>>>>>> "Camera Raw Files ( *.nef *.cr2 *.sr2 *.crw *.pef *.x3f *.kdc *.mrw *.arw *.k25 *.dcr *.orf *.raw *.raw *.raf *.srf *.dng )" On trying to open a CR2 file, Krita prints: krita.file: Couldn't create a valid graph for this source mimetype: "image/x-canon-cr2" Checking at system level (at least in KDE), the CR2 files are associated to another mime type than Krita expects. To prove this I added the new mime type "image/x-krita-raw" at system level and assigned the imaginary CR3 file extension to it. Then I renamed a CR2 file to CR3 and opened it in Dolphin with the Krita AppImage - et voila: Krita opens it in full size! Here are the correct mime types I got from the KDE file association tool: NEF: image/x-nikon-nef CR2: image/x-canon-cr2 SR2: image/x-sony-sr2 CRW: image/x-canon-crw x3f: image/x-sigma-x3f kdc:image/x-kodak-kdc mrw:image/x-minolta-mrw arw:image/x-sony-arw k25:image/x-kodak-k25 dcr:image/x-kodak-dcr orf:image/x-olympus-orf raw:image/x-panasonic-raw *.raw is a duplicate. Perhaps you meant *.rw2, which is image/x-panasonic-raw2 ? raf:image/x-fuji-raf srf:image/x-sony-srf dng:image/x-adobe-dng Tldr; : assigning the raw formats properly to their corresponding mime type should fix it.
Hm, when I open that .raw file I get: libkdcraw: "/home/boud/IMG_9645.raw" libkdcraw: -- RAW DECODING SETTINGS -------------------------------- -- autoBrightness: true -- sixteenBitsImage: false -- brightness: 1 -- RAWQuality: 0 -- inputColorSpace: 0 -- outputColorSpace: 1 -- RGBInterpolate4Colors: false -- DontStretchPixels: false -- unclipColors: 0 -- whiteBalance: 1 -- customWhiteBalance: 6500 -- customWhiteBalanceGreen: 1 -- halfSizeColorImage: true -- enableBlackPoint: false -- blackPoint: 0 -- enableWhitePoint: false -- whitePoint: 0 -- NoiseReductionType: 0 -- NoiseReductionThreshold: 0 -- enableCACorrection: false -- caMultiplier: 0, 0 -- medianFilterPasses: 0 -- inputProfile: "" -- outputProfile: "" -- deadPixelMap: "" -- whiteBalanceArea: QRect(0,0 0x0) -- dcbIterations: -1 -- dcbEnhanceFl: false -- eeciRefine: false -- esMedPasses: 0 -- NRChrominanceThreshold: 0 -- expoCorrection: false -- expoCorrectionShift: 0.994 -- expoCorrectionHighlight: 0 --------------------------------------------------------- libkdcraw: LibRaw progress: Reading metadata pass 1 of 2 libkdcraw: LibRaw: failed to run open_file: Unsupported file format or not RAW file libkdcraw: "/home/boud/IMG_9645.raw" libkdcraw: -- RAW DECODING SETTINGS -------------------------------- -- autoBrightness: true -- sixteenBitsImage: true -- brightness: 1 -- RAWQuality: 0 -- inputColorSpace: 0 -- outputColorSpace: 1 -- RGBInterpolate4Colors: false -- DontStretchPixels: false -- unclipColors: 0 -- whiteBalance: 1 -- customWhiteBalance: 6500 -- customWhiteBalanceGreen: 1 -- halfSizeColorImage: false -- enableBlackPoint: false -- blackPoint: 0 -- enableWhitePoint: false -- whitePoint: 0 -- NoiseReductionType: 0 -- NoiseReductionThreshold: 0 -- enableCACorrection: false -- caMultiplier: 0, 0 -- medianFilterPasses: 0 -- inputProfile: "" -- outputProfile: "" -- deadPixelMap: "" -- whiteBalanceArea: QRect(0,0 0x0) -- dcbIterations: -1 -- dcbEnhanceFl: false -- eeciRefine: false -- esMedPasses: 0 -- NRChrominanceThreshold: 0 -- expoCorrection: false -- expoCorrectionShift: 0.994 -- expoCorrectionHighlight: 0 --------------------------------------------------------- libkdcraw: LibRaw progress: Reading metadata pass 1 of 2 libkdcraw: LibRaw: failed to run open_file: Unsupported file format or not RAW file krita.general: Loading "/home/boud/IMG_9645.raw" failed
And 2.9 gives me the same result -- but that's on Linux.
Indeed... Google made a JPEG file with the extension .raw out of it. Sorry for the inconvenience, I didn't know that before. Here is an updated link which doesn't garble the file anymore: https://sourceforge.net/projects/scl-s-bug-report-attachments/files/IMG_9645.CR2/download Note that the extension raw is already associated with Panasonic raw camera files, so it must be CR2.
Sorry, I got really distracted by the other bugs and things... Did you have actually have a patch we can apply?
No problem ;-) I think reverting commit 47f05f2d3730b630eceaf5ea0f551550a06e8283 should do the trick. Yet I failed with my first attempts to get my changes compiled into the binaries, so it would take me some time to figure it out. I'm changing the platform and OS values back because it doesn't happen on OS X only, but also on Debian.
Try changing the file extension to all lowercase, All the Krita 3 versions in which I've tried won't open Sony .ARW files but will open .arw hope this may help.
Git commit 3ef661a7911dc82fd09a2e3e835365c245268f20 by Boudewijn Rempt. Committed on 08/08/2016 at 14:11. Pushed by rempt into branch 'master'. M +2 -2 libs/koplugin/KisMimeDatabase.cpp http://commits.kde.org/krita/3ef661a7911dc82fd09a2e3e835365c245268f20