DEV Community

爽哥
爽哥

Posted on Originally published at textraze.com Fully Autonomous

Changing one menu price in a flattened image: a PNG case study

Disclosure: I build TextRaze. This is a documented example from my own project, not a customer testimonial. The article was prepared with an autonomous AI assistant; the example files and measurements come from an archived application run.

A flattened menu image looks like a small editing job until you try to change a single price. The digits are pixels, so there is no text layer to select. Rebuilding the menu can take more effort than the change itself, while repainting too much of the image can introduce errors elsewhere.

Here is one narrow case, and how I checked the result rather than judging it only from a crop.

The task and the evidence

The source is our own AI-generated coffee-menu scene, saved as a 1024 × 1536 PNG. It is not a photograph supplied by a restaurant, and it is not a newly executed JPG test.

The requested change was the MOCHA price, $5.20 → $5.80. Another nearby line also contains $5.20 and must remain unchanged. That repeated number makes this a useful example: replacing every occurrence would be a wrong result.

Original AI-generated sample menu; the MOCHA price is $5.20.

Archived application output; the MOCHA price is $5.80.

These are the complete source and output images. The example was already generated in an earlier application run; no new generation was performed for this article.

The editing workflow

The focused text-editing flow in TextRaze is:

  1. Upload the menu image.
  2. Draw one rectangle around the price to change.
  3. Enter the original text, $5.20, and the replacement, $5.80.
  4. Explicitly start generation.
  5. Compare the result with the original and download it.

The user does not manually erase the old number or identify and install a matching font. The AI generates the selected change. That makes checking the resulting lettering and layout essential: an AI-generated result is not an editable text object with guaranteed glyph accuracy.

What I checked beyond the new price

The saved selection was x=525, y=577, width=83, height=38. The archived source and result both decode to 1024 × 1536 pixels.

For this run, the verification region is that rectangle expanded by eight pixels on each side. Comparing decoded pixel values found:

Check Observed result
Pixel dimensions Unchanged at 1024 × 1536
Changed pixels outside the expanded region 0
Changed pixels inside the expanded region 4,335
Target price MOCHA changes to $5.80
Neighboring repeated price The other $5.20 remains

The eight-pixel margin defines this particular verification boundary. It is not a measured universal limit for future edits.

A pixel comparison answers where the files differ. It does not establish that the replacement font is correct, that the image will print well, or that every attempt succeeds. Those still require inspection of the target and surrounding content. The saved run also does not establish a success rate or a typical completion time.

A practical acceptance checklist

Before publishing a changed menu, I would check the complete result at a readable size:

  • Every digit, currency symbol, decimal point, and separator in the target.
  • The item name and neighboring prices, especially repeated values.
  • Alignment, spacing, background texture, and any decoration close to the edit.
  • The downloaded image dimensions and the resolution needed for its intended use.

Retain the original file. A completed AI generation can still be an unwanted result; do not treat technical completion as acceptance.

When this workflow fits

This approach is aimed at an occasional change when the only available source is a JPG, PNG, or other flattened image. It can be useful for a price, an event date, or a short label.

If prices and dishes change every week, keeping an editable source document is a better long-term workflow. A focused image edit does not replace a menu-management system, and changing a number does not improve the resolution of an old export.

The full menu guide, source/result files, and limitations are on my project site. TextRaze uses paid generation credits; one-time packs start at $4.99. Preparing an edit and obtaining a satisfactory generated result are separate steps.

Top comments (0)