Bug 4117 - mime types for digicam raw image files
Summary: mime types for digicam raw image files
Status: RESOLVED DUPLICATE of bug 8170
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: All All
: high enhancement
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
: 3143 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-16 15:34 UTC by Stephane Chauveau
Modified: 2007-03-02 08:26 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
shared-mime-info-raw.patch (613 bytes, patch)
2006-09-14 02:30 UTC, Stanislav Brabec
Details | Splinter Review

Description Stephane Chauveau 2005-08-16 15:34:08 UTC
Almost every digital camera maker has its own proprietary RAW image file format. 
With the efforts of peoples like David Coffin, author of dcraw, it it now
possible to manipulate most of those raw files in Linux and other OSS.
Unfortunately, the lack of mime types make them pretty useless in Gnome, KDE and
other desktop environments. 

bug #3143 already propose to use the mime type "application/x-crw" for the Canon
RAW file format. "application" seems incorrect to me since those files are
images. Some applications such as gthumb, check on the mime category to select
the files. 

Also, that mime type does not reflect the fact that the format is specific to
canon. 

So I propose something of the form "image/x-vendor-ext"  
 
I made a list of well known vendor raw image files:

  <mime-type type="image/x-minolta-mrw">
    <comment>Minolta RAW image</comment>
    <glob pattern="*.mrw" />
  </mime-type> 

  <mime-type type="image/x-canon-crw">
    <comment>Canon RAW image</comment>
    <glob pattern="*.crw"/>
    <glob pattern="*.cr2"/>
  </mime-type>

  <mime-type type="image/x-nikon-nef">
    <comment>Nikon RAW image</comment>
    <glob pattern="*.nef"/>
  </mime-type>

  <mime-type type="image/x-kodak-dcr">
    <comment>Kodak RAW image</comment>
    <glob pattern="*.dcr"/>
  </mime-type>

  <mime-type type="image/x-olympus-orf">
    <comment>Olympus RAW image</comment>
    <glob pattern="*.orf"/>
  </mime-type>

  <mime-type type="image/x-fuji-raf">
    <comment>Fuji RAW image</comment>
    <glob pattern="*.raf"/>
  </mime-type>
Comment 1 Eugenia Loli-Queru 2006-07-29 17:05:48 UTC
Please add this to the list above:

  <mime-type type="image/x-kodak-kdc">
    <comment>Kodak RAW image</comment>
    <glob pattern="*.kdc"/>
  </mime-type>

This is the new type of RAW image that Kodak uses (the .dcr files are their old
format). Please add the above to shared-mime-info db because without it there
are two nasty effects:
1. Nautilus *crashes* ( http://bugzilla.gnome.org/show_bug.cgi?id=349043 )
2. All applications that support TIFF think that can handle this type of file,
while in reality only DCRAW, UFRaw (and maybe CinePaint) can. Until support for
this newer data format of KDC files is added to gtkpixbuf-tiff or to libtiff,
shared-mime-info must glob it (you see, as in most RAW files the container
format is TIFF, but the data format is different and so these files must have
exceptions).

You can test the suggested change by downloading my KDC picture here:
http://www.gnomefiles.org/shots/kdc.tar.bz2 (UFraw is the only GTK app that can
read it AFAIK, in case you really wanna check out that beautiful eagle in the
picture :))
Comment 2 Bastien Nocera 2006-08-25 09:03:37 UTC
*** Bug 3143 has been marked as a duplicate of this bug. ***
Comment 3 Bastien Nocera 2006-08-25 09:06:21 UTC
2006-08-25  Bastien Nocera  <hadess@hadess.net>

        * freedesktop.org.xml.in: patch from Stephane Chauveau
        <spam70@chauveau-central.net> and Eugenia Loli-Queru
        <eloli@hotmail.com> to add many raw image types from digital cameras
        (Closes: #4117)
Comment 4 Stanislav Brabec 2006-09-14 02:25:30 UTC
Reopening. As wrote above, container format of some formats is TIFF. Definition
of image/tiff in shared-mime-info-0.19 takes precedence of them and images are
still recognized as image/tiff.
Comment 5 Stanislav Brabec 2006-09-14 02:30:26 UTC
Created attachment 6974 [details] [review]
shared-mime-info-raw.patch

Patch for shared-mime-info-0.19. It may be incomplete, because I have only a
few test images:
image/x-canon-crw is a special TIFF
image/x-nikon-nef is a special TIFF
image/x-minolta-mrw is a block of binary data
I have no info for other formats.

After applying of this patch, it works in nautilus. It properly detects RAW
format, but it still offers TIFF applications, too.
Comment 6 Udi Fuchs 2006-10-24 16:39:35 UTC
Are you aware of bug 8170 that I opened on the same subject?

Among others, it contains a complete list of raw formats which are image/tiff
type. The patch from Stanislav is not accurate since only CR2 files are
image/tiff. CRW files are not image/tiff.

I hope that you could fix the current mime types soon, because at the moment I
think that they are causing more damage than good.
Comment 7 Frederic Crozat 2007-03-02 08:26:13 UTC
duplicate of bug #8170 which contains a more up to date patch

*** This bug has been marked as a duplicate of bug 8170 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.