के साथ काम नहीं कर रही है, किसी कारण से, जब मैं बाइट्सियो स्टीम से एक छवि बनाने की कोशिश करता हूं, तो यह छवि की पहचान नहीं कर सकता है।पीआईएल ओपन() विधि बाइट्सियो
from PIL import Image, ImageGrab
from io import BytesIO
i = ImageGrab.grab()
i.resize((1280, 720))
output = BytesIO()
i.save(output, format = "JPEG")
output.flush()
print(isinstance(Image.open(output), Image.Image))
और त्रुटि फेंक देता है की स्टैक ट्रेस:
Traceback (most recent call last):
File "C:/Users/Natecat/PycharmProjects/Python/test.py", line 9, in <module>
print(isinstance(Image.open(output), Image.Image))
File "C:\Python27\lib\site-packages\PIL\Image.py", line 2126, in open
% (filename if filename else fp))
IOError: cannot identify image file <_io.BytesIO object at 0x02394DB0>
मैं जनहित याचिका की तकिया कार्यान्वयन उपयोग कर रहा हूँ यहाँ मेरी कोड है। एक फ़ाइल वस्तु के रूप में BytesIO की