This commit is contained in:
Kovid Goyal 2021-09-30 08:39:27 +05:30
parent ea186ac48d
commit 4ce2690bd2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -72,12 +72,10 @@ class Frame:
self.mode = 'rgba' if q in ('blend', 'true') else 'rgb' self.mode = 'rgba' if q in ('blend', 'true') else 'rgb'
self.needs_blend = q == 'blend' self.needs_blend = q == 'blend'
self.dispose = getattr(Dispose, identify_data['dispose'].lower()) self.dispose = getattr(Dispose, identify_data['dispose'].lower())
if identify_data.get('orientation') in ('5', '6', '7', '8'): self.dimensions_swapped = identify_data.get('orientation') in ('5', '6', '7', '8')
if self.dimensions_swapped:
self.canvas_width, self.canvas_height = self.canvas_height, self.canvas_width self.canvas_width, self.canvas_height = self.canvas_height, self.canvas_width
self.width, self.height = self.height, self.width self.width, self.height = self.height, self.width
self.dimensions_swapped = True
else:
self.dimensions_swapped = False
def __repr__(self) -> str: def __repr__(self) -> str:
canvas = f'{self.canvas_width}x{self.canvas_height}:{self.canvas_x}+{self.canvas_y}' canvas = f'{self.canvas_width}x{self.canvas_height}:{self.canvas_x}+{self.canvas_y}'