Reading EXIF data from JPG

后端 未结 4 934
忘掉有多难
忘掉有多难 2020-12-11 08:37

I need to analyze thousands of jpeg files (by retrieving it EXIF data). It is more than 50 GB of data.I cannot read whole files because it\'ll take too much time.

Is

4条回答
  •  不知归路
    2020-12-11 09:03

    You don't need to decompress anything, the Exif information is held in the header before the image, so all you need to do is open the file, read the exif header and decode whatever it is you need. This is if you read the exif data manually (which isn't hard).

    If all you need is the sizes, that is right at the front

    Edit: note the exif data doesn't actualy have to be at the front, but it almost always is, so it is safe to assume that in general it will be a lot faster than if it wasn't.

    Also, have you checked that using the standard API is 'too slow'? I wouldn't have thought it would take that long for 50G (or if doing it a different way would necessarily be faster).

提交回复
热议问题