Commit b564b186 authored by narugo1992's avatar narugo1992
Browse files

dev(narugo): fix error on reading gif geninfo

parent c3e2249a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ def read_geninfo_gif(image: ImageTyping) -> Optional[str]:
    """
    image = load_image(image, mode=None, force_background=None)
    infos = image.info or {}
    if "comment" in infos:  # for gif
    if "comment" in infos and isinstance(infos['comment'], (bytes, bytearray)):  # for gif
        return infos["comment"].decode("utf8", errors="ignore")
    else:
        return None