def get_size(file_path):
try:<EOL><INDENT>im = _read_image(file_path)<EOL><DEDENT>except (IOError, IndexError, TypeError, AttributeError) as e:<EOL><INDENT>logger = logging.getLogger(__name__)<EOL>logger.error("<STR_LIT>", file_path, e)<EOL><DEDENT>else:<EOL><INDENT>width, height = im.size<EOL>return {<EOL>'<STR_LIT:width>': width,<EOL>'<STR_LIT>': height<EOL>}<EOL><DEDENT>
Return image size (width and height).