Skip to content

Commit 555b18d

Browse files
pory-gonepory-gone
andauthored
fix_cropbox_pfp (#2641)
Co-authored-by: pory-gone <pory-gone@kali>
1 parent ccbc424 commit 555b18d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

worker/imgproxy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,12 @@ const sign = (target) => {
203203
}
204204

205205
export async function processCrop ({ photoId, cropData }) {
206-
const { x, y, width, height, originalWidth, originalHeight, scale } = cropData
206+
const { x, y, width, height, originalWidth, originalHeight } = cropData
207207
const cropWidth = Math.round(originalWidth * width)
208208
const cropHeight = Math.round(originalHeight * height)
209209

210-
const centerX = x + width / scale
211-
const centerY = y + height / scale
210+
const centerX = x + width / 2
211+
const centerY = y + height / 2
212212

213213
const size = 200 // 200px avatar size
214214

0 commit comments

Comments
 (0)