1

I need to process large image jpeg files that do not contain thumbnails. I want to create thumbnails and insert into their Exif file, so that I can decide what processing is necessary later on.

On the PIL documentation https://pillow.readthedocs.io/en/3.1.x/reference/Image.html It says:

Image.thumbnail(size, resample=3) 
Make this image into a thumbnail. This method modifies the image to contain a thumbnail version of itself, ...

These two sentences are contradictory: is the image now a thumbnail or the image now has an embedded thumbnail? It seems to be the former.

user1596683
  • 131
  • 1
  • 8
  • I have used this in the past. It should essentially resize the image to my understanding. You can then save it using `im.save("filename", "JPEG")`. – Mason McGough Sep 19 '18 at 16:59
  • They're not totally contradictory, what it is trying to say is that the function modifies the image, as opposed to returning a modified image. It shrinks the image, is all. – alkasm Sep 19 '18 at 16:59
  • [This post](https://stackoverflow.com/questions/29367990/what-is-the-difference-between-image-resize-and-image-thumbnail-in-pillow-python) should help clarify the difference between the `resize` and `thumbnail` methods by the way. – Mason McGough Sep 19 '18 at 17:01
  • Thanks. The function is not what I need. My files are 36Mp. Is there a way to read only the thumbnail portion of the jpeg header? – user1596683 Sep 19 '18 at 17:05

0 Answers0