@vladmandic/face-api
Advanced tools
Comparing version 0.12.8 to 0.12.9
{ | ||
"name": "@vladmandic/face-api", | ||
"version": "0.12.8", | ||
"version": "0.12.9", | ||
"description": "FaceAPI: AI-powered Face Detection, Face Embedding & Recognition Using Tensorflow/JS", | ||
@@ -5,0 +5,0 @@ "main": "dist/face-api.node.js", |
@@ -50,7 +50,5 @@ import { FaceDetection } from '../classes/FaceDetection'; | ||
const faceImg = createCanvas({ width, height }); | ||
try { | ||
getContext2dOrThrow(faceImg).putImageData(ctx.getImageData(x, y, width, height), 0, 0); | ||
} catch { /**/ } | ||
if (width > 0 && height > 0) getContext2dOrThrow(faceImg).putImageData(ctx.getImageData(x, y, width, height), 0, 0); | ||
return faceImg; | ||
}); | ||
} |
@@ -24,5 +24,5 @@ import { env } from '../env/index'; | ||
const dy = centerImage && height < width ? offset : 0; | ||
getContext2dOrThrow(targetCanvas).drawImage(inputCanvas, dx, dy, width, height); | ||
if (inputCanvas.width > 0 && inputCanvas.height > 0) getContext2dOrThrow(targetCanvas).drawImage(inputCanvas, dx, dy, width, height); | ||
return targetCanvas; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
25617225
0
76732