1
こんにちは、私は次のコードリターンGIFの画像(画像はブラウザ上でアニメーション化されません)
@hug.get('/getgif', output=hug.output_format.image('gif'))
def get(username: str, password: str):
dir_path = os.path.dirname(__file__)
img_path = os.path.join(dir_path, 'animation.gif')
img = Image.open(img_path)
return img
を持っている私は、応答を作成するために、抱擁、のpython3とPILを使用しています。私のブラウザに返された画像はまったく気付かない。私はPILがGIF画像の最初のフレームを取り戻してそれを返すと推測しています。 GIF画像全体をブラウザに戻す方法はありますか?