Bug 304074 - Import of raw cr2 or NEF files failes
Summary: Import of raw cr2 or NEF files failes
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-26 08:23 UTC by Teunis
Modified: 2012-07-26 10:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Teunis 2012-07-26 08:23:23 UTC
Kubuntu with KDE 4.9 beta and Krita 2.5 rc.
When open a Nikon NEF raw photo all I get is a 160x120 px picture.
When I  open a Canon RC2 raw photo I get this error: Reason: Cannot create storage
When I use the Krita version included in KDE 4.8 I get a nice import menu and all is well.

Reproducible: Always
Comment 1 Halla Rempt 2012-07-26 08:32:41 UTC
Hi Teunis,

Thanks for your report. I've only got Fuji raw images (.RAF) here, and those still seem to work, at least on my opensuse development setup. Could you send me a NEF and RC2 file (boud@valdyas.org)? Then I'll test in a kubuntu vm with updated packages.
Comment 2 Teunis 2012-07-26 08:59:30 UTC
Op 26-07-12 10:32 schreef Boudewijn Rempt:
> https://bugs.kde.org/show_bug.cgi?id=304074
>
> Boudewijn Rempt <boud@valdyas.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |boud@valdyas.org
>
> --- Comment #1 from Boudewijn Rempt <boud@valdyas.org> ---
> Hi Teunis,
>
> Thanks for your report. I've only got Fuji raw images (.RAF) here, and those
> still seem to work, at least on my opensuse development setup. Could you send
> me a NEF and RC2 file (boud@valdyas.org)? Then I'll test in a kubuntu vm with
> updated packages.
>
Hello Boudewijn,

Thanks for the prompt action.

http://dl.dropbox.com/u/2701978/IMG_0025.CR2
http://dl.dropbox.com/u/2701978/DSC_0074.NEF


I do realise the Kubuntu ppa has not updated to the last RC.

Regards,
Teunis
Comment 3 Halla Rempt 2012-07-26 09:01:58 UTC
Yes, I can confirm the problem with these files, even on my development system. I'm suspecting that something with the mime type detection got broken recently.
Comment 4 Halla Rempt 2012-07-26 09:08:14 UTC
Hm... digikam can open these files right, so it's not something that's changed in kde's mimetype handling, but it's a problem in krita/calligra itself.
Comment 5 Teunis 2012-07-26 09:11:49 UTC
Op 26-07-12 11:08 schreef Boudewijn Rempt:
> https://bugs.kde.org/show_bug.cgi?id=304074
>
> --- Comment #4 from Boudewijn Rempt <boud@valdyas.org> ---
> Hm... digikam can open these files right, so it's not something that's changed
> in kde's mimetype handling, but it's a problem in krita/calligra itself.
>
Yes digikam, showFoto and Gimp (with the gimp-ufraw import plug-in) 
still work on these files.
Comment 6 Halla Rempt 2012-07-26 09:20:58 UTC
hm, it's because krita thinks that all these files are TIFF files. Probably because the magic number is the same as that for tiff.
Comment 7 Halla Rempt 2012-07-26 09:25:38 UTC
Git commit 4162dc5bd723abb480c7a65a740dfb63d60666a5 by Boudewijn Rempt.
Committed on 26/07/2012 at 11:24.
Pushed by rempt into branch 'master'.

Don't double-check the mimetype for raw files

Raw files like CR2 and NEF are actually a weird kind of file, NEF for
instance identifies as TIFF, but isn't. So if people rename their NEF
file to PNG, they are screwed, we cannot check the actual file contents
to determine the mimetype.

M  +0    -1    libs/main/KoDocument.cpp

http://commits.kde.org/calligra/4162dc5bd723abb480c7a65a740dfb63d60666a5
Comment 8 Halla Rempt 2012-07-26 09:26:25 UTC
Git commit 4a54b5f57bf8e424f23597caf9ec02e4b4b3ee2e by Boudewijn Rempt.
Committed on 26/07/2012 at 11:24.
Pushed by rempt into branch 'calligra/2.5'.

Don't double-check the mimetype for raw files

Raw files like CR2 and NEF are actually a weird kind of file, NEF for
instance identifies as TIFF, but isn't. So if people rename their NEF
file to PNG, they are screwed, we cannot check the actual file contents
to determine the mimetype.

M  +0    -1    libs/main/KoDocument.cpp

http://commits.kde.org/calligra/4a54b5f57bf8e424f23597caf9ec02e4b4b3ee2e
Comment 9 Halla Rempt 2012-07-26 09:27:05 UTC
Thanks again for testing the RC and spotting the problem, now the error won't be in 2.5.0 :-).
Comment 10 Teunis 2012-07-26 10:06:00 UTC
Op 26-07-12 11:27 schreef Boudewijn Rempt:
> https://bugs.kde.org/show_bug.cgi?id=304074
>
> --- Comment #9 from Boudewijn Rempt <boud@valdyas.org> ---
> Thanks again for testing the RC and spotting the problem, now the error won't
> be in 2.5.0 :-).
>
The pleasure is mine for being able to use this nice product!

Regards,
Teunis