From 6554148d8a76ed087b11b7344759a2e5afc24279 Mon Sep 17 00:00:00 2001 From: C85297 <95289555+C85297@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:25:31 +0000 Subject: [PATCH] remove debugging --- src/core/operations/AddTextToImage.mjs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/core/operations/AddTextToImage.mjs b/src/core/operations/AddTextToImage.mjs index 722a67fa..bc6fa48e 100644 --- a/src/core/operations/AddTextToImage.mjs +++ b/src/core/operations/AddTextToImage.mjs @@ -17,7 +17,6 @@ import { measureTextHeight, loadFont, } from "jimp"; -import log from "loglevel"; /** * Add Text To Image operation @@ -212,10 +211,6 @@ class AddTextToImage extends Operation { } }); - let outlog = ""; - outlog += `Adding text: "${text}" at (${xPos}, ${yPos}) with font: ${fontFace}, size: ${size}, colour: rgba(${red}, ${green}, ${blue}, ${alpha})\n`; - outlog += `Adding to image ${image.width}w, ${image.height}h\n`; - // Create a temporary image to hold the rendered text const textImage = new Jimp({ width: measureText(jimpFont, text), @@ -227,7 +222,6 @@ class AddTextToImage extends Operation { y: 0, text, }); - outlog += `Rendered text image size: ${textImage.width}w, ${textImage.height}h\n`; // Scale the rendered text image to the correct size const scaleFactor = size / 72; @@ -245,7 +239,6 @@ class AddTextToImage extends Operation { }); } } - outlog += `Scaled text image size: ${textImage.width}w, ${textImage.height}h\n`; // If using the alignment options, calculate the pixel values AFTER the image has been scaled switch (hAlign) { @@ -259,7 +252,6 @@ class AddTextToImage extends Operation { xPos = image.width - textImage.width; break; } - outlog += `Calculated xPos: ${xPos}\n`; switch (vAlign) { case "Top": @@ -272,8 +264,6 @@ class AddTextToImage extends Operation { yPos = image.height - textImage.height; break; } - outlog += `Calculated yPos: ${yPos}\n`; - // throw new OperationError(outlog); // Blit the rendered text image onto the original source image image.blit({ @@ -290,12 +280,9 @@ class AddTextToImage extends Operation { } return imageBuffer.buffer; } catch (err) { - throw new OperationError( - `Error adding text to image. (${err.stack})`, - { - cause: err, - }, - ); + throw new OperationError(`Error adding text to image. (${err})`, { + cause: err, + }); } }