def get_image_size(self, image):
if image['<STR_LIT:size>'] is None:<EOL><INDENT>args = settings.THUMBNAIL_IDENTIFY.split('<STR_LIT:U+0020>')<EOL>args.append(image['<STR_LIT:source>'] + '<STR_LIT>')<EOL>p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)<EOL>p.wait()<EOL>m = size_re.match(str(p.stdout.read()))<EOL>image['<STR_LIT:size>'] = int(m.group('<STR_LIT:x>')), int(m.group('<STR_LIT:y>'))<EOL><DEDENT>return image['<STR_LIT:size>']<EOL>
Returns the image width and height as a tuple