Skip to content

Commit fbd0813

Browse files
authored
Update examples/common.js
1 parent b8b52ca commit fbd0813

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/common.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ export async function buildUnixFSDagPB(chunks, mhCode = 0x12) {
114114
return { rootCid, dagBytes }
115115
}
116116

117+
/**
118+
* Generates (dynamic) images based on the input text.
119+
*/
117120
export function generateTextImage(file, text, width = 800, height = 600) {
118121
const canvas = createCanvas(width, height);
119122
const ctx = canvas.getContext("2d");

0 commit comments

Comments
 (0)