diff --git a/getimageinfo.py b/getimageinfo.py index c9741f8..ba72d23 100644 --- a/getimageinfo.py +++ b/getimageinfo.py @@ -41,6 +41,8 @@ def getImageInfo(data): jpeg.read(2) b = jpeg.read(1) try: + h = 0 + w = 0 while (b and ord(b) != 0xDA): while (ord(b) != 0xFF): b = jpeg.read(1) while (ord(b) == 0xFF): b = jpeg.read(1) @@ -58,4 +60,4 @@ def getImageInfo(data): except ValueError: pass - return content_type, width, height \ No newline at end of file + return content_type, width, height