How to use
- Draw ToolsFreeHub and line two at 32 pixels when you want a 640 by 148 PNG.
- Draw Hello image at 48 pixels when you want a 640 by 126 PNG.
- Insert your own line breaks. The canvas will not wrap.
Formula / how it works
The canvas is 640 pixels wide. Two lines, ToolsFreeHub and line two, at 32 pixels, use a line height of 46, which is 32 times 1.45 rounded, plus 28 pixels of padding on the top and the bottom. The height is 148. One line, Hello image, at 48 pixels, uses a line height of 70 and a height of 126. Both are PNG. The two-line file is 8.7 KB and the one-line file is 8.1 KB. Georgia draws the glyphs. The ground is a warm white, #fffdf8, and the ink is #1f2937.
A line is not wrapped. Characters past what fits are cut at 80 characters even sooner, so a paragraph pasted from an editor will lose its tail. Break the lines yourself. Forty lines is the cap. Line 41 is dropped. The size must sit between 12 and 96. A size of 8 is refused rather than drawing a speck.
This is not a prompt that invents a scene. The words you type are the words that are drawn. There is no model and no network call. The picture will not add a background photograph. If you wanted a code listing with line numbers on a dark ground, that is the code image page, which uses a monospace face and a fixed 16 pixel size.
The height formula is deterministic, which is why 148 and 126 can be checked without depending on how wide Georgia draws the word ToolsFreeHub. The width does not grow with the string. A short word and a long word on one line share the 640 pixel canvas. The long word is the one that gets cut.
You can turn the PNG into a JPEG afterwards. The white ground stays white. You can embed the JPEG in a PDF. Doing the drawing here keeps the line height explicit, instead of letting a PDF font substitution change it.
At 32 pixels the line height is 46 and two lines plus 56 pixels of padding reach 148. At 48 pixels one line plus the same padding idea reaches 126. Both widths stay 640 because the canvas does not grow with the sentence.
A listing with line numbers is code to image. A JPEG of the PNG is PNG to JPG.
Worked examples
Two lines at 32 pixels
Inputs: t2i-text: ToolsFreeHub / line two | t2i-size: 32
On this page, take ToolsFreeHub / line two, then 32 and press Draw PNG. Break lines yourself because the canvas will not wrap them.
Result: Text image: 640×148 PNG. The words are drawn in Georgia. The picture does not wrap a line that i…
One line at 48 pixels
Inputs: t2i-text: Hello image | t2i-size: 48
On this page, take Hello image, then 48 and press Draw PNG. Break lines yourself because the canvas will not wrap them.
Result: Text image: 640×126 PNG. The words are drawn in Georgia. The picture does not wrap a line that i…
Use cases
- Making a two-line label in Georgia on a warm white ground.
- Checking the height formula instead of measuring a screenshot.
- Cutting a line at 80 characters rather than shrinking the type.
- Refusing a size below 12 or above 96.
Tips & limitations
- Line height at 32 pixels is 46, because 32 times 1.45 rounds to 46.
- Padding is 28 pixels above and below.
- The ground is #fffdf8 and the ink is #1f2937.
- Line 41 is dropped.
FAQ
Why is the two-line PNG 148 pixels tall?
Two times 46, plus 28 pixels of padding on the top and the bottom, is 148. The width stays 640.
Why is the one-line PNG 126 pixels tall?
48 times 1.45 rounds to 70. One line plus 56 pixels of padding is 126.
Which face is drawn?
Georgia. A code listing with line numbers belongs on the code image page.
Does a long line wrap?
No. Characters past the canvas, and anything past 80 characters, are cut.
Is this a prompt that invents a scene?
No. The words you type are the words that are painted. There is no model.
How large were the sample files?
8.7 KB for the two-line PNG and 8.1 KB for the one-line PNG.
640 by 148 is ToolsFreeHub plus line two at 32 pixels. Your own line count changes the height by 46 pixels a line at that size.