Getting image size from png/jpeg/jpeg2000/gif file It parses image files’ header and return image size. PNG JPEG JPEG2000 GIF This is a pure Python library. Optional dependency: python3 (automatically detected)