change format all file
This commit is contained in:
@@ -21,7 +21,7 @@ async function getCroppedImg(imageSrc, pixelCrop) {
|
||||
ctx.drawImage(
|
||||
image,
|
||||
safeArea / 2 - image.width * 0.5,
|
||||
safeArea / 2 - image.height * 0.5
|
||||
safeArea / 2 - image.height * 0.5,
|
||||
);
|
||||
const data = ctx.getImageData(0, 0, safeArea, safeArea);
|
||||
|
||||
@@ -31,7 +31,7 @@ async function getCroppedImg(imageSrc, pixelCrop) {
|
||||
ctx.putImageData(
|
||||
data,
|
||||
Math.round(0 - safeArea / 2 + image.width * 0.5 - pixelCrop.x),
|
||||
Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y)
|
||||
Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y),
|
||||
);
|
||||
|
||||
return canvas.toDataURL("image/jpeg");
|
||||
|
||||
Reference in New Issue
Block a user