Rapid Photo Downloader

Thumbnail images from a variety of RAW images cannot be extracted

Reported by Damon Lynch on 2009-04-30
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Rapid Photo Downloader
High
Damon Lynch
pyexiv2
High
Olivier Tilloy

Bug Description

With some RAW images, pyexiv2 cannot extract thumbnails that exiv2 has no problems with. Here is a sample output with a Nikon D300 RAW file

$ exiv2 -pp Nikon-D300-DSC_0314.NEF
Preview 1: image/tiff, 160x120 pixels, 57600 bytes
Preview 2: image/jpeg, 570x375 pixels, 107718 bytes
Preview 3: image/jpeg, 4288x2848 pixels, 968651 bytes
$ exiv2 -ep2 Nikon-D300-DSC_0314.NEF
$ ls Nikon-D300-DSC_0314*
Nikon-D300-DSC_0314.NEF Nikon-D300-DSC_0314-preview2.jpg
$ python
>>> import pyexiv2
>>> i = pyexiv2.Image('Nikon-D300-DSC_0314.NEF')
>>> i.readMetadata()
>>> thumbnailType, thumbnail = i.getThumbnailData()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: Cannot access image thumbnail

The same happens with a Nikon D3, Olympus-E30 (ORF file), Samsung-GX10 (DNG file), and Mamiya ZD.

You can download sample RAW images from here:

http://raw.fotosite.pl/

Related branches

Olivier Tilloy (osomon) wrote :

The current version of pyexiv2 (0.1.3) doesn't take full advantage of exiv2's facilities to extract all image previews.
This will be fixed in 0.2.

Changed in pyexiv2:
assignee: nobody → Olivier Tilloy (osomon)
importance: Undecided → High
milestone: none → 0.2
status: New → Confirmed
Olivier Tilloy (osomon) on 2009-06-19
summary: - Thumbnail images from a variety of RAW images cannot be extacted
+ Thumbnail images from a variety of RAW images cannot be extracted
Olivier Tilloy (osomon) wrote :

I just tested again, and interestingly exiv2 0.19 simply fails to read the sample file (http://raw.fotosite.pl/download-Nikon_D300_50mm_f1.8/DSC_0314.NEF).
However, with pyexiv2 0.2 (latest development version) compiled against the latest revision of libexiv2, the three thumbnails embedded in the RAW file are correctly extracted.
Here is the syntax that would be used to achieve the same output as `exiv2 -pp Nikon-D300-DSC_0314.NEF`:

import pyexiv2
metadata = pyexiv2.ImageMetadata('Nikon-D300-DSC_0314.NEF')
metadata.read()
for i, p in enumerate(metadata.previews):
    print "Preview %d: %s, %dx%d pixels, %d bytes" % \
        (i+1, p.mime_type, p.dimensions[0], p.dimensions[1], p.size)

Changed in pyexiv2:
status: Confirmed → Fix Committed
Damon Lynch (dlynch3) on 2010-01-17
Changed in rapid:
importance: Undecided → High
assignee: nobody → Damon Lynch (dlynch3)
Olivier Tilloy (osomon) on 2010-03-25
Changed in pyexiv2:
status: Fix Committed → Fix Released
Nicolas Boulesteix (noxx-free) wrote :

I have the same problem with Nef files from a D200.

I try to update to the latest version of pyexvi2, but I give an other bug #570378

Damon Lynch (dlynch3) on 2010-05-15
Changed in rapid:
status: New → In Progress
Damon Lynch (dlynch3) on 2010-05-16
Changed in rapid:
status: In Progress → Fix Committed
Damon Lynch (dlynch3) on 2010-06-01
Changed in rapid:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions