LeoHsiao1 / pyexiv2

Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.
GNU General Public License v3.0
196 stars 39 forks source link

EXIF embedded image #98

Closed estribiyo closed 1 year ago

estribiyo commented 1 year ago

Is there any way to get/put embedded thumbnail image from/to APP1?

LeoHsiao1 commented 1 year ago

I didn't have a need to use thumbnails before, so I didn't implement the API. I can finish it at the weekend.

LeoHsiao1 commented 1 year ago

I did some research on that. Exiv2 supports reading and inserting thumbnails in IPEG images. But it's not a universal feature.

  1. When Exif thumbnails are extracted from JPEG images, they can only be saved to disk : thumbPath = newFilePath(path, "-thumb.jpg")
  2. Only JPEG thumbnails can be inserted (not TIFF thumbnails), and must be named path-thumb.jpg.
  3. The method eraseThumbnail() can be used directly.

Do you still want this feature?

LeoHsiao1 commented 1 year ago

Never mind, I found a lower level API that can read and write thumbnails as a byte stream.

LeoHsiao1 commented 1 year ago

I released v2.8.0

estribiyo commented 1 year ago

Many thanks!