@gallop.software/studio 2.3.90 → 2.3.92
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.
package/dist/client/index.html
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
12
12
|
}
|
|
13
13
|
</style>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-zGLiWRYA.js"></script>
|
|
15
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DfPQBmNf.css">
|
|
15
16
|
</head>
|
|
16
17
|
<body>
|
|
17
18
|
<div id="root"></div>
|
package/dist/server/index.js
CHANGED
|
@@ -4480,14 +4480,27 @@ async function handleEditImage(request) {
|
|
|
4480
4480
|
);
|
|
4481
4481
|
}
|
|
4482
4482
|
const imageBuffer = await fs11.readFile(absolutePath);
|
|
4483
|
-
|
|
4483
|
+
const exifCorrectedBuffer = await sharp7(imageBuffer).rotate().toBuffer();
|
|
4484
|
+
const exifMeta = await sharp7(exifCorrectedBuffer).metadata();
|
|
4485
|
+
const exifWidth = exifMeta.width || 0;
|
|
4486
|
+
const exifHeight = exifMeta.height || 0;
|
|
4487
|
+
let rotatedBuffer;
|
|
4488
|
+
let rotatedWidth;
|
|
4489
|
+
let rotatedHeight;
|
|
4484
4490
|
if (rotation !== 0) {
|
|
4485
|
-
|
|
4491
|
+
rotatedBuffer = await sharp7(exifCorrectedBuffer).rotate(rotation).toBuffer();
|
|
4492
|
+
if (rotation === 90 || rotation === 270) {
|
|
4493
|
+
rotatedWidth = exifHeight;
|
|
4494
|
+
rotatedHeight = exifWidth;
|
|
4495
|
+
} else {
|
|
4496
|
+
rotatedWidth = exifWidth;
|
|
4497
|
+
rotatedHeight = exifHeight;
|
|
4498
|
+
}
|
|
4499
|
+
} else {
|
|
4500
|
+
rotatedBuffer = exifCorrectedBuffer;
|
|
4501
|
+
rotatedWidth = exifWidth;
|
|
4502
|
+
rotatedHeight = exifHeight;
|
|
4486
4503
|
}
|
|
4487
|
-
const rotatedBuffer = await pipeline.toBuffer();
|
|
4488
|
-
const rotatedMeta = await sharp7(rotatedBuffer).metadata();
|
|
4489
|
-
const rotatedWidth = rotatedMeta.width || 0;
|
|
4490
|
-
const rotatedHeight = rotatedMeta.height || 0;
|
|
4491
4504
|
const cropX = Math.max(0, Math.min(crop.x, rotatedWidth - 1));
|
|
4492
4505
|
const cropY = Math.max(0, Math.min(crop.y, rotatedHeight - 1));
|
|
4493
4506
|
const cropWidth = Math.min(crop.width, rotatedWidth - cropX);
|