<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Lim's Dev Notes]]></title><description><![CDATA[Notes on building AI tools and independent web products. Practical lessons in frontend development, technical decisions, product launches, and experiments.]]></description><link>https://limbuilder.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6ac6319e7bc6fbe376acfbb9/0eb20546-36dd-4f05-8e36-4a3c8beb0c10.png</url><title>Lim&apos;s Dev Notes</title><link>https://limbuilder.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Nov 2026 19:31:31 GMT</lastBuildDate><atom:link href="https://limbuilder.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Building an AI Photo Editor: Why Not Every Edit Should Be Generative]]></title><description><![CDATA[I'm building GetAIPhotoEditor, a browser-based AI photo editor where users upload an image, describe what they want to change, and generate an edited…]]></description><link>https://limbuilder.hashnode.dev/building-an-ai-photo-editor-why-not-every-edit-should-be-generative</link><guid isPermaLink="true">https://limbuilder.hashnode.dev/building-an-ai-photo-editor-why-not-every-edit-should-be-generative</guid><dc:creator><![CDATA[CoderLim]]></dc:creator><pubDate>Tue, 10 Nov 2026 03:17:24 GMT</pubDate><content:encoded><![CDATA[<p>I'm building <a href="https://getaiphotoeditor.com/">GetAIPhotoEditor</a>, a browser-based AI photo editor where users upload an image, describe what they want to change, and generate an edited version.</p>
<p>The interface is fairly simple. Most of the work happens behind the scenes.</p>
<p>One thing I've been thinking about is how to handle different kinds of edits. At first, it seems reasonable to send everything through a generative image model. Background replacement, object removal, photo enhancement — just change the prompt and let the model handle it.</p>
<p>But there's a problem with that approach.</p>
<p>Sometimes users want a new image. Other times, they want their original image with one specific change.</p>
<p>Those aren't quite the same thing.</p>
<h2>The Problem with "Keep Everything Else Unchanged"</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6ac6319e7bc6fbe376acfbb9/c29b5902-83f6-47af-978c-e8e3bfa7da7c.png" alt="" style="display:block;margin:0 auto" />

<p>Imagine uploading a product photo and asking an AI model to replace the background with a clean studio setting.</p>
<p>The result might look great. But if you compare it closely with the original, you may notice small differences.</p>
<p>The product label might change. A logo could look slightly different. The shape of a handle or the texture of a material might not match perfectly.</p>
<p>This isn't necessarily a bug in the model. Generative image editing can reconstruct parts of an image instead of preserving every original pixel.</p>
<p>A prompt like this can help:</p>
<blockquote>
<p>Replace the background with a clean white studio background. Keep the product shape, logo, text, colors, and all other details unchanged.</p>
</blockquote>
<p>But it's still an instruction, not a guarantee.</p>
<p>For casual creative editing, small differences might be acceptable. For an e-commerce product photo, they can be a real problem.</p>
<h2>Background Removal Is a Different Task</h2>
<p>I decided to treat background removal separately from general image editing.</p>
<p>Instead of asking a generative model to recreate an image without its background, I use a dedicated background removal model.</p>
<p>The basic idea is to separate the foreground from the background and produce a transparent PNG.</p>
<p>The model identifies which pixels belong to the subject and which belong to the background. The result contains transparency information, so it can be placed over another image.</p>
<p>The important difference is that the foreground isn't intentionally redrawn as a new object.</p>
<p>This is particularly useful for product photos, portraits, and images containing text or logos.</p>
<p>It isn't perfect, though.</p>
<p>Hair, transparent materials, glass, and soft shadows can still be difficult to isolate. You have to inspect those details before using the result.</p>
<p>But for tasks where preserving the original subject matters, this approach makes more sense than regenerating the entire picture.</p>
<h2>Changing Backgrounds Without Regenerating the Subject</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6ac6319e7bc6fbe376acfbb9/fd6bfbfb-0b9e-408a-986c-ccaf112960dc.png" alt="" style="display:block;margin:0 auto" />

<p>Once I had background removal working, I realized I could reuse the same result for background changes.</p>
<p>The workflow is straightforward:</p>
<ol>
<li>Upload the original image.</li>
<li>Run foreground segmentation to create a transparent cutout.</li>
<li>Choose a new background color or image.</li>
<li>Composite the cutout over the new background.</li>
<li>Export the result.</li>
</ol>
<p>The interesting part is step four.</p>
<p>After the foreground is extracted, switching backgrounds doesn't require another AI generation request. The compositing happens in the browser.</p>
<p>That means a user can try a white background, a beige background, or an uploaded photo without regenerating the subject each time.</p>
<p>I added this workflow to my <a href="https://getaiphotoeditor.com/photo-background-changer">Photo Background Changer</a>.</p>
<p>There are practical benefits beyond image consistency.</p>
<p>It avoids repeated inference costs for each background choice, and users can preview different options without waiting for a new model response.</p>
<p>Of course, compositing introduces another problem: the lighting and shadows in the original photo may not match the new background.</p>
<p>A product photographed under warm indoor lighting won't automatically look natural against a bright outdoor scene.</p>
<p>So this method is useful when subject preservation matters more than perfect scene reconstruction.</p>
<h2>When Generative Editing Makes More Sense</h2>
<p>I still use generative image editing for more flexible tasks.</p>
<p>For example:</p>
<ul>
<li>Removing an unwanted object and filling in the missing background.</li>
<li>Changing the appearance of furniture in a room.</li>
<li>Adjusting lighting or the overall mood of a photo.</li>
<li>Replacing a scene where realistic integration matters more than exact pixel preservation.</li>
</ul>
<p>These operations often require generating new visual information.</p>
<p>If you remove a person standing in front of a building, the model has to create the part of the building that was hidden.</p>
<p>A foreground segmentation model can't solve that problem by itself.</p>
<p>The general editor uses GPT Image 2.6 through AI API providers, while the background removal workflow uses a different type of model.</p>
<p>I'm not trying to force every editing feature through one API.</p>
<h2>The UI Should Hide Most of This Complexity</h2>
<p>From a user's perspective, these operations are all just photo editing.</p>
<p>They shouldn't need to understand the difference between generative editing, segmentation, alpha transparency, and compositing.</p>
<p>They just want to upload a picture and get the result they asked for.</p>
<p>That's one reason I've kept the UI relatively simple.</p>
<p>The general editor lets users describe a change in natural language. More specific tools provide a focused workflow without requiring users to write prompts.</p>
<p>But I also think it's important to set the right expectations.</p>
<p>A generative model might alter details that weren't supposed to change. A segmentation model can preserve the original foreground but produce imperfect edges. Browser compositing can keep the subject consistent but won't automatically fix lighting differences.</p>
<p>These trade-offs should influence which operation the application chooses.</p>
<h2>What I'm Taking Away from This</h2>
<p>Working on this project has made me more careful about choosing AI models based on the actual task.</p>
<p>Using the most capable generative model for everything isn't necessarily the best approach.</p>
<p>Sometimes a specialized model gives users more predictable results. Sometimes a simple browser operation can replace another expensive API request.</p>
<p>For me, the important distinction is whether the user wants the application to <strong>create something new</strong> or <strong>preserve something that already exists</strong>.</p>
<p>That decision affects the model, the processing workflow, the cost, and ultimately the quality of the result.</p>
<p>I'm still improving the editor, but I expect this distinction to remain important as I add more features.</p>
<p>If you're building an image editing product, I'm curious how you decide when to use generative models and when to use more traditional image processing techniques.</p>
]]></content:encoded></item></channel></rss>