Parses image files' header and returns image size
