diff --git a/packages/core/src/utils/image-bitmap.js b/packages/core/src/utils/image-bitmap.js index 8e60f958..e01e5e6d 100644 --- a/packages/core/src/utils/image-bitmap.js +++ b/packages/core/src/utils/image-bitmap.js @@ -3,6 +3,7 @@ import FileType from "file-type"; import { throwError } from "@jimp/utils"; import EXIFParser from "exif-parser"; // modify-exif +import modifyEXIF from "modify-exif"; import * as constants from "../constants"; import * as MIME from "./mime"; @@ -135,12 +136,12 @@ function transformBitmap(img, width, height, transformation) { img.bitmap.width = width; img.bitmap.height = height; - // img.bitmap.data = modifyEXIF(data, (_data) => { - // _data["0th"][274] = 1; - // return _data; - // }); + img.bitmap.data = modifyEXIF(data, (_data) => { + _data["0th"][274] = 1; + return _data; + }); - img.bitmap.data = data; + // img.bitmap.data = data; img._exif = EXIFParser.create(data).parse(); } diff --git a/packages/jimp/test/Landscape-output-2-PR.jpg b/packages/jimp/test/Landscape-output-2-PR.jpg index 139b3fe3..704d7882 100644 Binary files a/packages/jimp/test/Landscape-output-2-PR.jpg and b/packages/jimp/test/Landscape-output-2-PR.jpg differ diff --git a/packages/jimp/test/Landscape-output-3-PR.jpg b/packages/jimp/test/Landscape-output-3-PR.jpg index f0969d8e..f4be1ec2 100644 Binary files a/packages/jimp/test/Landscape-output-3-PR.jpg and b/packages/jimp/test/Landscape-output-3-PR.jpg differ diff --git a/packages/jimp/test/Landscape-output-4-PR.jpg b/packages/jimp/test/Landscape-output-4-PR.jpg index 3783d159..63ae09aa 100644 Binary files a/packages/jimp/test/Landscape-output-4-PR.jpg and b/packages/jimp/test/Landscape-output-4-PR.jpg differ diff --git a/packages/jimp/test/Landscape-output-5-PR.jpg b/packages/jimp/test/Landscape-output-5-PR.jpg index f64d0fde..3d9dff79 100644 Binary files a/packages/jimp/test/Landscape-output-5-PR.jpg and b/packages/jimp/test/Landscape-output-5-PR.jpg differ diff --git a/packages/jimp/test/Landscape-output-6-PR.jpg b/packages/jimp/test/Landscape-output-6-PR.jpg index 49636676..9fe5d021 100644 Binary files a/packages/jimp/test/Landscape-output-6-PR.jpg and b/packages/jimp/test/Landscape-output-6-PR.jpg differ diff --git a/packages/jimp/test/Landscape-output-7-PR.jpg b/packages/jimp/test/Landscape-output-7-PR.jpg index 2d242e80..3b3ded1b 100644 Binary files a/packages/jimp/test/Landscape-output-7-PR.jpg and b/packages/jimp/test/Landscape-output-7-PR.jpg differ diff --git a/packages/jimp/test/Landscape-output-8-PR.jpg b/packages/jimp/test/Landscape-output-8-PR.jpg index 982088d6..e4d686ce 100644 Binary files a/packages/jimp/test/Landscape-output-8-PR.jpg and b/packages/jimp/test/Landscape-output-8-PR.jpg differ diff --git a/packages/jimp/test/Portrait-output-2-PR.jpg b/packages/jimp/test/Portrait-output-2-PR.jpg index 139b3fe3..704d7882 100644 Binary files a/packages/jimp/test/Portrait-output-2-PR.jpg and b/packages/jimp/test/Portrait-output-2-PR.jpg differ diff --git a/packages/jimp/test/Portrait-output-3-PR.jpg b/packages/jimp/test/Portrait-output-3-PR.jpg index f0969d8e..f4be1ec2 100644 Binary files a/packages/jimp/test/Portrait-output-3-PR.jpg and b/packages/jimp/test/Portrait-output-3-PR.jpg differ diff --git a/packages/jimp/test/Portrait-output-4-PR.jpg b/packages/jimp/test/Portrait-output-4-PR.jpg index 3783d159..63ae09aa 100644 Binary files a/packages/jimp/test/Portrait-output-4-PR.jpg and b/packages/jimp/test/Portrait-output-4-PR.jpg differ diff --git a/packages/jimp/test/Portrait-output-5-PR.jpg b/packages/jimp/test/Portrait-output-5-PR.jpg index f64d0fde..3d9dff79 100644 Binary files a/packages/jimp/test/Portrait-output-5-PR.jpg and b/packages/jimp/test/Portrait-output-5-PR.jpg differ diff --git a/packages/jimp/test/Portrait-output-6-PR.jpg b/packages/jimp/test/Portrait-output-6-PR.jpg index 49636676..9fe5d021 100644 Binary files a/packages/jimp/test/Portrait-output-6-PR.jpg and b/packages/jimp/test/Portrait-output-6-PR.jpg differ diff --git a/packages/jimp/test/Portrait-output-7-PR.jpg b/packages/jimp/test/Portrait-output-7-PR.jpg index 2d242e80..3b3ded1b 100644 Binary files a/packages/jimp/test/Portrait-output-7-PR.jpg and b/packages/jimp/test/Portrait-output-7-PR.jpg differ diff --git a/packages/jimp/test/Portrait-output-8-PR.jpg b/packages/jimp/test/Portrait-output-8-PR.jpg index 982088d6..e4d686ce 100644 Binary files a/packages/jimp/test/Portrait-output-8-PR.jpg and b/packages/jimp/test/Portrait-output-8-PR.jpg differ