¡@

Home 

python Programming Glossary: datastream.read

Get image size wihout downloading it in Python

http://stackoverflow.com/questions/7460218/get-image-size-wihout-downloading-it-in-python

datastream ReseekFile.ReseekFile datastream data str datastream.read 30 #Skipping to jpeg # handle JPEGs elif size 2 and data.startswith.. ' 377 330' content_type 'image jpeg' datastream.seek 0 datastream.read 2 b datastream.read 1 try while b and ord b 0xDA while ord b.. 'image jpeg' datastream.seek 0 datastream.read 2 b datastream.read 1 try while b and ord b 0xDA while ord b 0xFF b datastream.read..