Skip to content

extracting thumbnail image from exif data

Latest
Compare
Choose a tag to compare
@artyil artyil released this 15 Jul 07:56

I needed to extract thumbnails from exif data so i implemented that function and some other improvements if anyone interested.

i don't know if it should be a pull request or just leave it as a forked repository ... so it is for you to decide. btw - big thanks to @jseidelin for making this code licensed as open source !!!

details of my changes:

  1. use strict added to prevent global namespace(scope) pollution
  2. added comments to some code parts
  3. slicing only first 128KB of the original image file - this way the initial ViewData buffer being created much faster! exif data should be always less then 64kbX2
  4. log masseges are now handled by local function
  5. refactoring variable names within some functions
  6. exif thumbnail image IFD tags added
  7. the thumbnail data (if found) will be extracted into exifdata.thumbnail property
  8. file indentation changes - tabs replaced with "2 spaces"