Support exif thumbnails

Registered by Stani

http://tilloy.net/dev/pyexiv2/tutorial.htm

Two methods of the Image class allow you to manipulate directly the thumbnail data as a string buffer: getThumbnailData() and setThumbnailData(data_buffer).

The deleteThumbnail() method removes the JPEG thumbnail from the file.

The dumpThumbnailToFile(filename) and setThumbnailFromJpegFile(filename) methods allow you to respectively export the thumbnail to a JPEG file and set the JPEG thumbnail from an existing image file.

>>> image.dumpThumbnailToFile('thumbnail')
>>> image.setThumbnailFromJpegFile('thumbnail2.jpg')
>>> image.writeMetadata()
Note that, since the JPEG thumbnail is part of the EXIF metadata, you also need to call the writeMetadata() method for the changes to be written back to the image file after modifying the thumbnail.

Blueprint information

Status:
Complete
Approver:
Stani
Priority:
High
Drafter:
Stani
Direction:
Approved
Assignee:
Stani
Definition:
Approved
Series goal:
Accepted for 0.2
Implementation:
Implemented
Milestone target:
milestone icon 0.2.1
Started by
Stani
Completed by
Stani

Related branches

Sprints

Whiteboard

Beta uploaded to PPA.

Needs testing for tiff images

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.