mv watermark
Browse files
src/lib/services/picletExport.ts
CHANGED
|
@@ -175,11 +175,11 @@ export async function generateShareableImage(piclet: PicletInstance): Promise<Bl
|
|
| 175 |
ctx.textAlign = 'center';
|
| 176 |
ctx.fillText(`BST: ${bst}`, canvasWidth / 2, containerY + containerHeight - 10);
|
| 177 |
|
| 178 |
-
// Load and draw translucent watermark
|
| 179 |
const logoImg = await loadImage('/assets/snap_logo.png');
|
| 180 |
-
const logoSize =
|
| 181 |
ctx.globalAlpha = 0.3; // More translucent
|
| 182 |
-
ctx.drawImage(logoImg, canvasWidth - logoSize - 30,
|
| 183 |
ctx.globalAlpha = 1.0;
|
| 184 |
|
| 185 |
// Get the image as blob
|
|
|
|
| 175 |
ctx.textAlign = 'center';
|
| 176 |
ctx.fillText(`BST: ${bst}`, canvasWidth / 2, containerY + containerHeight - 10);
|
| 177 |
|
| 178 |
+
// Load and draw translucent watermark in top-right
|
| 179 |
const logoImg = await loadImage('/assets/snap_logo.png');
|
| 180 |
+
const logoSize = 120; // Slightly smaller for top placement
|
| 181 |
ctx.globalAlpha = 0.3; // More translucent
|
| 182 |
+
ctx.drawImage(logoImg, canvasWidth - logoSize - 30, 30, logoSize, logoSize);
|
| 183 |
ctx.globalAlpha = 1.0;
|
| 184 |
|
| 185 |
// Get the image as blob
|