Skip to content

Commit c9bff59

Browse files
authored
Merge pull request #389 from aziontech/stage
Release 3.1.1
2 parents 7bed559 + ce0ff91 commit c9bff59

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## <small>3.1.1-stage.1 (2026-02-13)</small>
2+
3+
* fix: simplify resize percentage calculations (#387) ([77c71c3](https://github.com/aziontech/lib/commit/77c71c3)), closes [#387](https://github.com/aziontech/lib/issues/387)
4+
15
## 3.1.0 (2026-02-11)
26

37
* Merge pull request #386 from aziontech/stage ([375d97b](https://github.com/aziontech/lib/commit/375d97b)), closes [#386](https://github.com/aziontech/lib/issues/386)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "azion",
3-
"version": "3.1.0",
3+
"version": "3.1.1-stage.1",
44
"description": "Azion Packages for Edge Computing.",
55
"scripts": {
66
"prepare": "husky",

packages/wasm-image-processor/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ function resize(image: photon.PhotonImage, width: number, height: number, usePer
1010
const imageWidth = image.get_width();
1111
const imageHeight = image.get_height();
1212

13-
const widthPercent = usePercent ? width : (width * 100.0) / imageWidth;
14-
const heightPercent = usePercent ? height : (height * 100.0) / imageHeight;
13+
const widthPercent = usePercent ? width : width / imageWidth;
14+
const heightPercent = usePercent ? height : height / imageHeight;
1515

16-
const newWidth = (imageWidth * widthPercent) / 100;
17-
const newHeight = (imageHeight * heightPercent) / 100;
16+
const newWidth = imageWidth * widthPercent;
17+
const newHeight = imageHeight * heightPercent;
1818

1919
return photon.resize(image, newWidth, newHeight, 1);
2020
}

0 commit comments

Comments
 (0)