After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 344598 - import photos ignores RAW format images
import photos ignores RAW format images
Status: RESOLVED NOTABUG
Product: gthumb
Classification: Other
Component: general
2.9.x
Other All
: Normal enhancement
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2006-06-11 18:17 UTC by john stultz
Modified: 2007-01-29 17:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description john stultz 2006-06-11 18:17:07 UTC
It would be nice if gthumb's import feature (gnome-volume-manager-gthumb) would also import images captures in RAW (NEF) format. In my case, using a Nikon D50, only jpg images on the camera are imported. This forces me to goto the shell and type "gphoto2 -P" to download the RAW images.
Comment 1 Michael Chudobiak 2006-09-25 17:08:23 UTC
Thanks for the bug report. This particular request-for-enhancement has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 145564 ***
Comment 2 john stultz 2007-01-17 20:28:33 UTC
Sorry, this is pretty old, but I guess the bug 145564 broadly covers the issue, I don't really need gthumb to view raw images, but just to see they are there and import them. If 145564 really covers this, then fine, but I just wanted to be sure. thanks!
Comment 3 Michael Chudobiak 2007-01-17 20:39:50 UTC
OK, that's a little bit different. It might be a whole lot easier to add the import of raw photos (as opposed to viewing them).

gThumb imports AVIs, even though it can't view them, so I'm not sure why it doesn't import raw photos... maybe it could be added as an option. Not sure yet...

- Mike
Comment 4 Paolo Bacchilega 2007-01-18 09:41:06 UTC
dlg-photo-importer.c:valid_mime_type is used to check if the file is an image, a video or a audio file.
Comment 5 Michael Chudobiak 2007-01-18 13:00:40 UTC
Some thoughts -

Right now:

1) gthumb gets a list of all camera files in load_images_preview.

2) load_images_preview__step calls gp_camera_file_get with the GP_FILE_TYPE_PREVIEW parameter to get a list of thumbnails from the camera.

3) The user can then select some or none of these thumbnails. If none are selected, all will be add to the import list.

4) gthumb then cycles through the import list with gp_camera_file_get with the GP_FILE_TYPE_NORMAL parameter to download the full image files. (To download RAW images, you need to use the GP_FILE_TYPE_RAW parameter instead. And for audio, you would need GP_FILE_TYPE_AUDIO).


I'm not sure about this, but I don't think the GP_FILE_TYPE_PREVIEW step reports previews of RAW files, so we probably need to do this:

A) Modify load_images_preview__step so that if PREVIEW fails, try RAW or AUDIO modes, using generic icons in the displayed file list.

B) Modify save_image so that if NORMAL fails, try RAW or AUDIO modes.


Does anyone see flaws in this? I haven't used RAW files before, so I could be missing the obvious...

- Mike
Comment 6 Michael Chudobiak 2007-01-18 13:17:38 UTC
Let me modify that, because it's a silly method. We probably need to:

A) Modify load_images_preview__step to check the file type as reported by gp_camera_file_get_info. (Save the file type in a list, to avoid duplication in the next step?) Treat PREVIEW files as we currently do, but add cases to handle RAW and AUDIO files, using generic icons for them in the displayed thumbnails.

B) Modify save_image to check the file type as reported by gp_camera_file_get_info (or refer to the saved type list?). Download all files in the list, using the correct type parameter as reported by gp_camera_file_get_info.

That doesn't seem so difficult...

- Mike
Comment 7 Steve Rainwater 2007-01-18 16:42:09 UTC
Just to be sure I understand the difference, this bug is concerned with getting the RAW image files from the camera onto the computer (importing them) and bug 145564 is concerned with being able to view the images contained in the RAW files after they've been imported. Is that correct?

Assuming I've got that right, I'd like to suggest that all RAW formats are supported, not just Nikon's NEF. I use Canon and Fuji cameras, for example. Each variety of files has its own filename extension. You can find sample images files for many RAW formats here: http://www.glasslantern.com/RAWpository/
Comment 8 Michael Chudobiak 2007-01-18 16:44:59 UTC
Yes, this bug is about importing only.

The raw import feature as currently outlined would support whatever libgphoto2 recognizes as a raw photo file.

- Mike
Comment 9 Michael Chudobiak 2007-01-18 19:11:05 UTC
Note to self: valid_mime_type has to be changed too, or it will filter out RAW files.

- Mike
Comment 10 Michael Chudobiak 2007-01-18 19:27:05 UTC
I'm not sure that it is possible to determine the file type (RAW, PREVIEW, AUDIO) before using the gp_camera_file_get function on the file. That is, you have to download the file to know the type!

So perhaps the error-based switching of comment 5 is better.

- Mike
Comment 11 Michael Chudobiak 2007-01-18 20:56:29 UTC
After all my theorizing here, I tested a camera with RAW photo support... and gthumb imports it just fine! (Minolta MRW files).

So... what's the actual problem here? Does MRW work, but NEF doesn't?

I need some clearer reports of what works and what doesn't. It you have a raw format that doesn't import, please let me know what version of libgphoto2 you have installed (and the gthumb version)

- Mike
Comment 12 Michael Chudobiak 2007-01-18 21:03:35 UTC
Sample files (which don't import correctly) would be helpful.

- Mike
Comment 13 Michael Chudobiak 2007-01-18 21:08:02 UTC
John,

Is image/x-nikon-nef registered as a mime type on your system? (It is on mine).

- Mike
Comment 14 john stultz 2007-01-21 19:59:38 UTC
How does one check registered mime types?
Comment 15 john stultz 2007-01-21 20:08:49 UTC
Checking the properties on a .NEF file pulled using "gphoto -P", I see:
Type: TIFF image
MIME type: image/tiff


However, gphoto -L shows:
There is no file in folder '/'.                                                
There is 1 file in folder '/special'.
#1     curve.ntc
There is no file in folder '/store_00010001'.
There is no file in folder '/store_00010001/DCIM'.
There is no file in folder '/store_00010001/DCIM/100NCD50'.
There is 1 file in folder '/store_00010001/DCIM/101NCD50'.
#2     DSC_5646.NEF                 5463 KB application/x-unknown

Also, sample images will be ~5.3megs, are you sure you want that?
Comment 16 Michael Chudobiak 2007-01-21 20:40:31 UTC
John,

Running:
grep -r nef /usr/share/mime*/

on my system returns a bunch of references to "image/x-nikon-nef". I'm not sure what the "official" way of listing registered mimetypes is. There must be a command for that... anybody know?

Please attach a sample nef image here (assuming it will let you), or somewhere where I can download it. I will copy it to a flash card, and see if gthumb can import it using the libgphoto2 mass storage driver.

- Mike
Comment 17 john stultz 2007-01-22 04:41:26 UTC
$ grep -ir nef /usr/share/mime*
/usr/share/mime/packages/gnome-raw-thumbnailer.xml:    <glob pattern="*.nef" />
/usr/share/mime/packages/gnome-raw-thumbnailer.xml:    <glob pattern="*.NEF" />
/usr/share/mime/globs:image/x-dcraw:*.nef
/usr/share/mime/globs:image/x-dcraw:*.NEF
/usr/share/mimelnk/image/x-raw.desktop:Patterns=*.raw;*.RAW;*.dcr;*.DCR;*.dng;*.DNG;*.crw;*.CRW;*.cr2;*.CR2;*.nef;*.NEF;*.mrw;*.MRW;*.bay;*.bmq;*.cs1;*.dc2;*.erf;*.fff;*.hrd;*.k25;*.kdc;*.mdc;*.mos;*.orf;*.pef;*.pxn;*.raf;*.rdc;*.sr2;*.srf;*.x3f;
/usr/share/mimelnk/image/x-xcf-gimp.desktop:Comment[ven]=Tshivhumbeo tsha tshifanyiso tsha henefho tsha GIMP

(Snipped the clearly incorrect hits).

Unfortunately the NEF file won't attach (too large).
Send me email and I'll privately reply w/ a link to a sample image.
Comment 18 Michael Chudobiak 2007-01-22 12:38:58 UTC
John,

email me at mjc@avtechpulse.com. (I don't think I have your email address.)

- Mike
Comment 19 Michael Chudobiak 2007-01-22 18:46:52 UTC
John,

I copied your NEF image onto a flash card which also had some JPG and MRW images. gThumb imported them all just fine (using a card reader).

gThumb even displays your NEF image as a 160x120 TIFF image. (It's still a 5.3 MB file, so there is obviously more data there, but it is displaying something at least. gqview shows the same thing.)

Do you have a flash card reader? Maybe try importing through the flash card reader instead of through the camera - the libgphoto2 camera driver might have a bug. Maybe that's why the file is reported as "application/x-unknown" by gphoto2 -L...

This isn't really looking like a gthumb issue...

- Mike
Comment 20 john stultz 2007-01-27 19:24:08 UTC
True, putting the camera in mass-storage mode and re-running gnome-volume-manager-gthumb appeared to work as I'd expect. 

So it does look to be a gphoto issue. I'll continue looking to see how to get gphoto's mime type to do the right thing.
Comment 21 Michael Chudobiak 2007-01-29 17:53:36 UTC
John,

Is it OK if I make your image (DSC_5646.NEF) publicly available as a sample image for test purposes?

There seems to be a shortage of publicly available test photos in RAW formats.

- Mike