@runnerpro/backend 1.6.19 → 1.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -283,13 +283,10 @@ const rotateOrientationImage = (data, filePath, image = null, mimetype) => __awa
|
|
|
283
283
|
if (!image)
|
|
284
284
|
image = yield jimp_1.default.read(filePath);
|
|
285
285
|
const orientation = yield exifr_1.default.orientation(data);
|
|
286
|
-
let rotate;
|
|
287
|
-
if ([7, 8].includes(orientation))
|
|
288
|
-
|
|
289
|
-
else if ([
|
|
290
|
-
rotate = 180;
|
|
291
|
-
else if ([5, 8].includes(orientation))
|
|
292
|
-
rotate = -90;
|
|
286
|
+
let rotate = 90;
|
|
287
|
+
// if ([7, 8].includes(orientation)) rotate = 90;
|
|
288
|
+
// else if ([3].includes(orientation)) rotate = 180;
|
|
289
|
+
// else if ([5, 8].includes(orientation)) rotate = -90;
|
|
293
290
|
if (rotate)
|
|
294
291
|
image = yield image.rotate(rotate);
|
|
295
292
|
return image.getBufferAsync(jimp_1.default.MIME_JPEG);
|