Explorar o código

Scale faces to be 1.5 times bigger

denikson %!s(int64=6) %!d(string=hai) anos
pai
achega
4ff501a4cb
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      main.js

+ 2 - 1
main.js

@@ -120,7 +120,8 @@ async function processFaceSwap(message, attachmentUrl) {
         let ew = emojiImage.getWidth();
         let eh = emojiImage.getHeight();
 
-        let scaleFactor = Math.max(bw, bh) / Math.max(ew, eh);
+        const CONSTANT_SCALE = 1.5;
+        let scaleFactor = Math.max(bw, bh) / Math.min(ew, eh) * CONSTANT_SCALE;
         ew *= scaleFactor;
         eh *= scaleFactor;