INNER CODE UNIT · TypeScript
targetWidth
silvia-odwyer/photon · webpack_demo/src/index.ts:141
const targetWidth = newimg.width >= img2.width ? newimg.width + 1 : img2.width;
const targetHeight =
newimg.height >= img2.height ? newimg.height + 1 : img2.height;
if (canvas2.width !== targetWidth || canvas2.height !== targetHeight) {
canvas2.width = targetWidth;
canvas2.height = targetHeight;
}
ctx2.clearRect(0, 0, canvas2.width, canvas2.height);
ctx2.drawImage(img2, 0, 0, canvas2.width, canvas2.height);
};
const blendWithMode = (
photon: ExtendedPhotonModule,
base: ReturnType<ExtendedPhotonModule["open_image"]>,
overlay: ReturnType<ExtendedPhotonModule["open_image"]>,
mode: string,
) => {
if (!overlay) {