jimp-dev/jimp

Autorotate based on exif not working

Open

#920 建立於 2020年7月30日

在 GitHub 查看
 (7 留言) (6 反應) (0 負責人)JavaScript (785 fork)batch import
bughelp wanted

倉庫指標

Star
 (13,218 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Both in the browser and in node, Jimp is not autorotating based on exif. I'm using Jimp.read(buffer), does autorotate not work with buffers?

Here's the typescript code let image = await Jimp.read(buffer); let photo = await image.cover( 1920. 1920, Jimp.HORIZONTAL_ALIGN_CENTER | Jimp.VERTICAL_ALIGN_MIDDLE, ); buffer = await photo.getBufferAsync(Jimp.MIME_JPEG);

the buffer then contains an image with the rotation exif information stripped out, but not rotated properly. This also happened on 0.13.0.

貢獻者指南