mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Use rgba data for opaque animations that uses blended frames
This commit is contained in:
@@ -140,7 +140,12 @@ def identify(path: str) -> ImageData:
|
||||
data = json.loads(b'[' + p.stdout.rstrip(b',') + b']')
|
||||
first = data[0]
|
||||
frames = list(map(Frame, data))
|
||||
return ImageData(first['fmt'].lower(), frames[0].width, frames[0].height, frames[0].mode, frames)
|
||||
mode = 'rgb'
|
||||
for f in frames:
|
||||
if f.mode == 'rgba':
|
||||
mode = 'rgba'
|
||||
break
|
||||
return ImageData(first['fmt'].lower(), frames[0].width, frames[0].height, mode, frames)
|
||||
|
||||
|
||||
class RenderedImage(ImageData):
|
||||
|
||||
Reference in New Issue
Block a user