[Digikam-devel] [Bug 119170] New: Kodak Z700 thumbnail and image retrieval fails, but works in gphoto2

Austin Clements amdragon+kdebugzilla at mit.edu
Thu Dec 29 10:44:49 GMT 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=119170         
           Summary: Kodak Z700 thumbnail and image retrieval fails, but
                    works in gphoto2
           Product: digikam
           Version: 0.8.0
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: digikam-devel kde org
        ReportedBy: amdragon+kdebugzilla mit edu


Version:           0.8.0 (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3.6 
OS:                Linux

After selecting "USB PTP Class Camera" from the Camera menu, the transfer dialog appears and lists all of the files on my Kodak Z700.  However, none of the thumbnails appear, and the list includes three non-image files: DCEMAIL.ABK, DDISCVRY.DPS, and LABELCTB.LCB.  If I click on any of the image files, an error appears, saying "Failed to retrieve file 100_xxxx.JPG from camera".  If I try to download any of the files, a "Failed to download file 100_xxxx.JPG" error appears.  Both Digikam 0.7.1 and 0.8.0 behave this way.  However, using gphoto2 directly works.

I did some hacking on the code, so I have some idea of what's going wrong, though no idea why.  "gphoto2 -T" successfully transfers the thumbnails, and "gphoto2 -P" gets all images, so I compared the operation of gphoto2 with Digikam.  What I found was that Digikam tries to transfer the thumbnail of DCEMAIL.ABK from "/store_00020001" immediately after retrieving the file list.  As soon as libgphoto2 sends the request for this thumbnail, the protocol locks up and the camera no longer sends any responses to any later requests from libgphoto2, so Digikam can't get any of the real thumbnails or download any photos.  "gphoto2 -T", on the other hand, first tries to download the thumbnail of 100_0001.JPG from "/store_00010001/DCIM/100KZ700".  This succeeds, as do the rest of the images.  Only after downloading all of the image thumbnails does gphoto2 try to download the thumbnail of DCEMAIL.ABK.  This transfer fails as it did for Digikam, which causes gphoto2 to give up at this point.

Going on this, I added an quick hack to Digikam that simply skips downloading anything that doesn't begin with "100" (specifically, I added a check of itemName to GPCamera::getThumbnail).  'Lo and behold, everything works.  All of the thumbnails appear for the image files and I can download images.

Of course, this is the entirely wrong way to go about this.  Could Digikam simply ignore such control files?  Omitting them from the file listing would enhance the interface and not attempting to download thumbnails of them would make Digikam not fail on the Kodak Z700.  I suspect other cameras have similar control files, though I don't know if attempting to download thumbnails of them causes the protocol to freeze as it does for my camera.



More information about the Digikam-devel mailing list