0

I'm loading my images from a blob and I would like to load only the first page. I know this is possible with the [0] syntax when it is in a file but is there a way to do that without writing my image to the disk? Thanks

Christo S. Christov
  • 2,268
  • 3
  • 32
  • 57

1 Answers1

1

Try this....

with Image(blob=my_image_blob, format="PDF[0]") as img:
    pass

Where "PDF[0]" is replaced with the correct decoder. Like "PS[0]", "GIF[0]". or 'TIFF[0]" as examples.

emcconville
  • 23,800
  • 4
  • 50
  • 66