<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>The workshop – Sandkassa</title><link>https://sandkassa.app/en/workshop</link><description>How the Sandkassa apps come to be. Written by Espen.</description><language>en</language><item><title>Green screens and good old-fashioned Python: how I make stickers with an image model</title><link>https://sandkassa.app/en/workshop/green-screen-for-stickers</link><guid>https://sandkassa.app/en/workshop/green-screen-for-stickers</guid><pubDate>Sat, 21 Nov 2026 11:00:00 GMT</pubDate><description>Chroma keying, flood fills, a bit of trial and error and a thin white edge. How I cut out clothes an image model has drawn, for a sticker app I made for my daughters. The post has demos you can try yourself, so it is best read on the website.</description><content:encoded><![CDATA[<p><em>The post has demos you can try yourself, so it is best read on the website.</em></p><p>Give an image model a drawing and ask it to dress the figure, and you don’t get the same drawing back with clothes on. You get a new drawing. The face is slightly different, the hands are redrawn, and the lines have moved. That makes it surprisingly hard to cut out just the clothes.</p>
<p>I’ve been nerding out quite a bit with image models and image processing this year, and it ended up as a sticker app for my daughters. I wanted to automate as much as possible around the AI, both so I could test it programmatically and so it would be easy to make new pages when the girls got bored of the ones we had and came up with new ideas.</p>
<p>It ended with a green doll, chroma keying like in film and TV, and a few Python scripts that do the rest. Most of it isn’t AI at all, just image processing. I’ve included the things that didn’t work too. The demos run straight in your browser, on the same pictures the stickers in the app were cut from.</p>
<h2 id="first-idea-subtract-the-doll-from-the-picture">First idea: subtract the doll from the picture</h2>
<p>The first idea was the simplest one I could think of. I gave the image model the doll and asked it to draw the clothes on her. Then I subtracted the undressed doll from the dressed picture, pixel by pixel. Whatever was different had to be the clothes. It’s plain background subtraction, a technique much older than image models, with the doll as the background.</p>
<p>But the model draws a whole new picture, including the parts you didn’t ask it to touch. Try it:</p>
<p><em>There is a demo here you can try yourself.</em> <a href="https://sandkassa.app/en/workshop/green-screen-for-stickers">Try it on the website</a>.</p>
<p>I couldn’t find a threshold that works, anyway. Set it low and you get the outline of the face and the hands, in pink, because the model drew the lines slightly differently. Set it high and the trousers and boots get holes, in red, wherever the colour happens to match what was underneath. Switch on “Show what the model redrew” and you can see that even the eyes have been redrawn.</p>
<p>In practice the clothes came with bits of neck and hands, and the shoes got holes where the foot showed through. I rubbed out skin by hand. Whatever I missed, the girls found.</p>
<h2 id="two-more-dead-ends">Two more dead ends</h2>
<p>I also tried asking the model to draw the piece of clothing on its own, on a transparent background. The clothes looked fine, but they didn’t fit the doll. The model had no body to draw on, so the shape and size came out a bit different every time. And the model’s transparency isn’t entirely to be trusted, as you’ll see further down.</p>
<p>Then I looked at segmentation, tools like rembg that separate the foreground from the background, and tested it a little. They work well on a thing standing on its own, like an umbrella or a frog. But here the doll is foreground too, and I wanted to separate the jacket from the arm inside it. The trousers under the jacket aren’t in the picture at all, so no model can cut them out. And segmentation is another model, with its own guesses. I’d rather have something I could predict.</p>
<h2 id="green-screen-make-the-doll-green">Green screen: make the doll green</h2>
<p>Then I thought of how films do it. The actor stands in front of a green wall, and everything green gets replaced afterwards. It’s called chroma keying, and film and TV have used it for decades. No need to invent anything new, so I made the doll green.</p>
<ol class="steg" start="1" style="--n:3" data-astro-cid-dkj5dit3><li style="--vri:-1.5deg" data-astro-cid-dkj5dit3><span class="nr" aria-hidden="true" data-astro-cid-dkj5dit3>1</span><img src="https://sandkassa.app/_astro/ballerina-dukke.BX47D_nn_1MwhMo.webp" srcset="https://sandkassa.app/_astro/ballerina-dukke.BX47D_nn_Z2k05LO.webp 240w, https://sandkassa.app/_astro/ballerina-dukke.BX47D_nn_1YxAhY.webp 480w" alt="A drawn doll in a lilac vest and shorts, from the ballerina page" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="700" height="937"><span class="tekst" data-astro-cid-dkj5dit3>The doll</span></li><li style="--vri:1deg" data-astro-cid-dkj5dit3><span class="nr" aria-hidden="true" data-astro-cid-dkj5dit3>2</span><img src="https://sandkassa.app/_astro/ballerina-mannekeng.DuIVOGh3_1Ky7PS.webp" srcset="https://sandkassa.app/_astro/ballerina-mannekeng.DuIVOGh3_Z26CtwW.webp 240w, https://sandkassa.app/_astro/ballerina-mannekeng.DuIVOGh3_Z1eFj1O.webp 480w" alt="The same doll, flat signal green with faint darker green lines" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="700" height="937"><span class="tekst" data-astro-cid-dkj5dit3>Same doll, signal green</span></li><li style="--vri:-0.5deg" data-astro-cid-dkj5dit3><span class="nr" aria-hidden="true" data-astro-cid-dkj5dit3>3</span><img src="https://sandkassa.app/_astro/ballerina-pakledd.ucLN62qY_EOvv1.webp" srcset="https://sandkassa.app/_astro/ballerina-pakledd.ucLN62qY_LgLcJ.webp 240w, https://sandkassa.app/_astro/ballerina-pakledd.ucLN62qY_1vCsw4.webp 480w" alt="The green doll wearing a tiara, a pink tutu leotard and pink ballet shoes" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="700" height="937"><span class="tekst" data-astro-cid-dkj5dit3>The model dresses it</span></li></ol>
<p>A small script turns the doll signal green, <code>#00E040</code>. Only faint, darker lines are left, where she has fingers, ears and a face, so the model can see where things are. The model gets the mannequin and a normal picture of the doll, so it knows which style to draw in, and then it dresses the mannequin. I’ve tried quite a few image models with this. My favourite right now, in November 2026, is probably ChatGPT, and that’s the one drawing here. But the technique works well with plenty of other models too.</p>
<p>Now there’s nothing to compare. Green is body, the background is transparent, and whatever is left is clothes. A pixel is body when green is more than 45 above both red and blue. The demo below uses the same rule, with a soft edge. Watch the hands and the wings: they’re green, so they disappear, however the model happened to draw them.</p>
<p><em>There is a demo here you can try yourself.</em> <a href="https://sandkassa.app/en/workshop/green-screen-for-stickers">Try it on the website</a>.</p>
<p>Green clothes don’t work, though, because they look like body. A robot suit got a green button, and the button became a hole. It got a yellow one instead. So clothes with a lot of green in them are drawn on a magenta mannequin. And on the page where the doll has both a green dinosaur suit and a purple dragon suit, the mannequin is cyan.</p>
<ol class="steg sammen" start="1" style="--n:2" data-astro-cid-dkj5dit3><li style="--vri:-1.5deg" data-astro-cid-dkj5dit3><img src="https://sandkassa.app/_astro/magenta.BPFBhS2G_Z2sgunr.webp" srcset="https://sandkassa.app/_astro/magenta.BPFBhS2G_ZCA1CR.webp 240w, https://sandkassa.app/_astro/magenta.BPFBhS2G_1y2JR6.webp 480w" alt="A magenta mannequin in a green pyjama top with red reindeer and red and green striped slippers, from the baker page" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="542" height="726"><span class="tekst" data-astro-cid-dkj5dit3>Magenta: green Christmas pyjamas</span></li><li style="--vri:1deg" data-astro-cid-dkj5dit3><img src="https://sandkassa.app/_astro/cyan.BqCtrRGH_Z2e8nYQ.webp" srcset="https://sandkassa.app/_astro/cyan.BqCtrRGH_Z11tG6m.webp 240w, https://sandkassa.app/_astro/cyan.BqCtrRGH_Z2bBltU.webp 480w" alt="A cyan mannequin with a green dinosaur hood and green dino feet, from the dinosaur page" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="542" height="726"><span class="tekst" data-astro-cid-dkj5dit3>Cyan: dinosaur suit</span></li></ol>
<p>The green screen didn’t make a page any quicker to produce. It takes about as long as before. But the stickers came out whole, and I don’t have to rub out hands any more.</p>
<h2 id="one-outfit-drawn-three-times">One outfit, drawn three times</h2>
<p>The next problem was clothes on top of each other. The jacket covers the top of the trousers, and the boots cover the bottom. Cut the trousers out of that picture and you get trousers with no waistband and a ragged hem.</p>
<ol class="steg sammen" start="1" style="--n:2" data-astro-cid-dkj5dit3><li style="--vri:-1.5deg" data-astro-cid-dkj5dit3><img src="https://sandkassa.app/_astro/bukse-klippet.e8B_SSbR_1OKfzy.webp" srcset="https://sandkassa.app/_astro/bukse-klippet.e8B_SSbR_1uuxGM.webp 240w, https://sandkassa.app/_astro/bukse-klippet.e8B_SSbR_1OKfzy.webp 400w" alt="Dark blue fire trousers without a waistband, with a ragged edge at the bottom where the boots were" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="400" height="571"><span class="tekst" data-astro-cid-dkj5dit3>Cut from the full outfit</span></li><li style="--vri:1deg" data-astro-cid-dkj5dit3><img src="https://sandkassa.app/_astro/bukse-hel.1bR59Py9_Zh5EzR.webp" srcset="https://sandkassa.app/_astro/bukse-hel.1bR59Py9_21d9zR.webp 240w, https://sandkassa.app/_astro/bukse-hel.1bR59Py9_Zh5EzR.webp 400w" alt="The same fire trousers, whole, with waistband, button and complete reflective stripes" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="400" height="571"><span class="tekst" data-astro-cid-dkj5dit3>Drawn whole</span></li></ol>
<p>The fix is to ask for the same outfit three times in the same conversation. First the whole outfit, so the style matches across all the pieces. Then the same picture again, with only the jacket, helmet and boots. Finally only the trousers, drawn whole, including the parts that were under the jacket and inside the boots.</p>
<ol class="steg" start="1" style="--n:3" data-astro-cid-dkj5dit3><li style="--vri:-1.5deg" data-astro-cid-dkj5dit3><span class="nr" aria-hidden="true" data-astro-cid-dkj5dit3>1</span><img src="https://sandkassa.app/_astro/brann-hel.BtkIKmix_Z1EoBNc.webp" srcset="https://sandkassa.app/_astro/brann-hel.BtkIKmix_Z12LmiD.webp 240w, https://sandkassa.app/_astro/brann-hel.BtkIKmix_2jY75N.webp 480w" alt="The green doll wearing a fire helmet, fire jacket, trousers and boots" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="700" height="937"><span class="tekst" data-astro-cid-dkj5dit3>The whole outfit</span></li><li style="--vri:1deg" data-astro-cid-dkj5dit3><span class="nr" aria-hidden="true" data-astro-cid-dkj5dit3>2</span><img src="https://sandkassa.app/_astro/lag-topp.CrjNPONc_iFOd0.webp" srcset="https://sandkassa.app/_astro/lag-topp.CrjNPONc_2g12lA.webp 240w, https://sandkassa.app/_astro/lag-topp.CrjNPONc_Z21wG40.webp 480w" alt="The green doll with only the fire helmet, fire jacket and boots" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="700" height="937"><span class="tekst" data-astro-cid-dkj5dit3>Only jacket, helmet and boots</span></li><li style="--vri:-0.5deg" data-astro-cid-dkj5dit3><span class="nr" aria-hidden="true" data-astro-cid-dkj5dit3>3</span><img src="https://sandkassa.app/_astro/lag-bukse.Be4wKpnA_FP5Pw.webp" srcset="https://sandkassa.app/_astro/lag-bukse.Be4wKpnA_1isll5.webp 240w, https://sandkassa.app/_astro/lag-bukse.Be4wKpnA_ZoXj4p.webp 480w" alt="The green doll with only the dark blue fire trousers, whole from waist to ankles" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="700" height="937"><span class="tekst" data-astro-cid-dkj5dit3>Only the trousers, whole</span></li></ol>
<p>Now every piece of clothing is a whole sticker, and the child can dress the doll in any order. But the order matters: whatever goes on last ends up on top. Put the jacket on before the trousers and the trousers end up over the jacket. That’s how a real sticker book works too, and the girls got it quickly. It’s part of the fun. Dress the doll in the wrong order and you’ll see:</p>
<p><em>There is a demo here you can try yourself.</em> <a href="https://sandkassa.app/en/workshop/green-screen-for-stickers">Try it on the website</a>.</p>
<p>There’s no snapping in the app either. The sticker stays where the child lets go of it.</p>
<figure class="bilde bred" style="--vri:1.5deg; --tape:rgb(255 240 194 / 0.9)" data-astro-cid-ybdj54xn><span class="teip" aria-hidden="true" data-astro-cid-ybdj54xn></span><img src="https://sandkassa.app/_astro/fri-plassering.Bc1KT2Jr_1rpVTv.webp" srcset="https://sandkassa.app/_astro/fri-plassering.Bc1KT2Jr_Z7fe6O.webp 480w, https://sandkassa.app/_astro/fri-plassering.Bc1KT2Jr_Z18QGjh.webp 800w, https://sandkassa.app/_astro/fri-plassering.Bc1KT2Jr_Z1Izeyx.webp 1200w" alt="A child's finger placing a small sticker on a doll in a pink fairy dress with wings, in front of a toadstool and a tree. More stickers are lined up on the right." sizes="(max-width: 760px) 92vw, 760px" data-astro-cid-ybdj54xn="true" loading="lazy" decoding="async" width="1400" height="1050"><figcaption data-astro-cid-ybdj54xn>Placed freely. Grandpa as a fairy, from the silly pages.</figcaption></figure>
<h2 id="what-the-model-still-gets-wrong">What the model still gets wrong</h2>
<p>Three pictures per outfit is three chances to get it wrong. In October around 95 out of 100 pictures could be used as they were, I reckon. But the model isn’t stable. In November it painted a lot more chequerboards than before.</p>
<p>The chequerboard is the strangest one. Sometimes the model doesn’t make a transparent background at all, but paints a grey and white chequerboard, the way image editors show transparency. Which is pretty funny, really. The models are trained on millions of pictures from the internet, and apparently a lot of them claim to be transparent but are really screenshots from some editor with a chequerboard behind. So the model has learned that this is what transparent looks like. You get what you train. I added a step that removes light grey checks connected to the edge of the image. Then a white bunad shirt disappeared, because it was taken for checks. Now the checks are only removed when they actually reach the edge, and not when the picture has real transparency. White clothes on painted checks are still tricky.</p>
<ol class="steg sammen" start="1" style="--n:2" data-astro-cid-dkj5dit3><li style="--vri:-1.5deg" data-astro-cid-dkj5dit3><img src="https://sandkassa.app/_astro/feil-ruter.DqioO1rU_Z11Xoej.webp" srcset="https://sandkassa.app/_astro/feil-ruter.DqioO1rU_217qCC.webp 240w, https://sandkassa.app/_astro/feil-ruter.DqioO1rU_Z1cTuOL.webp 480w" alt="The green doll in a purple hoodie and red shoes, on a painted grey and white chequerboard" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="542" height="726"><span class="tekst" data-astro-cid-dkj5dit3>Painted &quot;transparency&quot;</span></li><li style="--vri:1deg" data-astro-cid-dkj5dit3><img src="https://sandkassa.app/_astro/feil-hvit-bukse.DvwMzpnZ_20t2eX.webp" srcset="https://sandkassa.app/_astro/feil-hvit-bukse.DvwMzpnZ_19mxLy.webp 240w, https://sandkassa.app/_astro/feil-hvit-bukse.DvwMzpnZ_nI62q.webp 480w" alt="The green doll in white trousers, on a painted grey and white chequerboard" sizes="(max-width: 640px) 44vw, 220px" data-astro-cid-dkj5dit3="true" loading="lazy" decoding="async" width="542" height="726"><span class="tekst" data-astro-cid-dkj5dit3>White trousers on painted checks</span></li></ol>
<p>And clothes that don’t cover all of the underwear, like a swimsuit, let the doll’s vest or shorts show through. I haven’t fully solved that.</p>
<h2 id="trial-and-error-puts-the-picture-back-in-place">Trial and error puts the picture back in place</h2>
<p>The model also sometimes draws the body a little bigger or slightly shifted, and now and then the picture comes back in a different size from the one I sent. So the script lays the picture over the mannequin and tries things out: a bit bigger, a bit smaller, a bit to the side, until the green fits best. It’s plain trial and error, no machine learning involved, coarse first and then fine around the best match. On the firefighter page, under half a per cent of the green ended up outside the mannequin.</p>
<p>Once the picture is in place, the script also measures where each piece belongs on the doll. That’s used for the book cover, the preview and the tests, never to pull the sticker into place.</p>
<h2 id="the-white-edge">The white edge</h2>
<p>Nothing ever comes out quite perfect when you mask images. There are always a few pixels in the transition that are a bit of both, a bit clothing and a bit green. Here and there a greenish tinge is left behind.</p>
<p>So the script first peels off the outermost pixels with a green tinge, where the clothes meet the body. Small holes are found by flood-filling from the edge of the image, and small jaggies are smoothed away. It all comes ready-made in Pillow and SciPy. There’s no despill here, no recolouring of green edge pixels back to the right colour. They’re simply removed, and the edge is softened by one pixel. That works because the drawings are flat, with clear outlines.</p>
<p>But when you’re making stickers, you have a saving grace: the thin white edge. It sits underneath the sticker and shows 5.5 page units all the way round, on a page that is 700 units wide. And you could go further and pull it a little into the picture, so it covers the outermost pixels and takes the noise with it.</p>
<p>Try it on the tiara from the ballerina page, which is drawn on top of the green hair. Pull the edge into the picture and watch the green tinge go, and compare with the actual-size view. The demo fills holes with a closing where the script uses a flood fill, but the result is roughly the same.</p>
<p><em>There is a demo here you can try yourself.</em> <a href="https://sandkassa.app/en/workshop/green-screen-for-stickers">Try it on the website</a>.</p>
<p>I don’t do all of this in the app. The peeling, the smoothing and the edge underneath are there, but the edge isn’t pulled into the picture. On an iPad screen with around four million pixels, a greenish pixel here and there is too small to see.</p>
<figure class="bilde bred" style="--vri:-1deg; --tape:rgb(251 221 228 / 0.92)" data-astro-cid-ybdj54xn><span class="teip" aria-hidden="true" data-astro-cid-ybdj54xn></span><img src="https://sandkassa.app/_astro/kant-naerbilde.BDePxmXb_Z23nIU2.webp" srcset="https://sandkassa.app/_astro/kant-naerbilde.BDePxmXb_2nWiB0.webp 480w, https://sandkassa.app/_astro/kant-naerbilde.BDePxmXb_1mkPox.webp 800w, https://sandkassa.app/_astro/kant-naerbilde.BDePxmXb_Z9bLz9.webp 1200w" alt="Close-up of an iPad with a green monster on a purple space page. The monster is built from several stickers: body, arms, legs and antennae, each with its own white edge." sizes="(max-width: 760px) 92vw, 760px" data-astro-cid-ybdj54xn="true" loading="lazy" decoding="async" width="1400" height="1050"><figcaption data-astro-cid-ybdj54xn>The edge on a real screen. Every part of the monster is its own sticker, and the edges overlap like paper.</figcaption></figure>
<h2 id="trust-but-verify">Trust but verify</h2>
<p>The last script came about because I kept stumbling on mistakes. At the start of November I found a sticker with two things in one, some stickers that were too small to get a proper grip on, and a hat that was see-through. You don’t spot those things looking at one sticker at a time in a folder.</p>
<p>So now every sticker is measured the way the app gets it, with the white edge on, and each one is checked for four things:</p>
<ul>
<li><strong>Pieces:</strong> more than one white island in the same sticker, meaning two things have become one.</li>
<li><strong>Holes:</strong> transparent holes inside the sticker, where the doll would show through.</li>
<li><strong>Pale:</strong> how much of the drawing is semi-transparent, so it looks pale and grey on the doll.</li>
<li><strong>Small:</strong> under 60 page units on the longest side, or under 30 on the shortest.</li>
</ul>
<p>Everything ends up on sheets seven stickers wide, two pages per sheet. Anything I should look at more closely gets a red background and a red note underneath.</p>
<figure class="bilde bred" style="--vri:1deg; --tape:rgb(221 235 250 / 0.92)" data-astro-cid-ybdj54xn><span class="teip" aria-hidden="true" data-astro-cid-ybdj54xn></span><img src="https://sandkassa.app/_astro/oversiktsark.TC6bhRC1_29o0UX.webp" srcset="https://sandkassa.app/_astro/oversiktsark.TC6bhRC1_Zcl8Ox.webp 480w, https://sandkassa.app/_astro/oversiktsark.TC6bhRC1_25m4mW.webp 800w, https://sandkassa.app/_astro/oversiktsark.TC6bhRC1_Z1faPQi.webp 1200w" alt="A contact sheet of stickers from the rainy weather page: sou'wester, rain jacket, wellies, umbrellas, a frog and a snail. The rain cloud is marked in red for holes." sizes="(max-width: 760px) 92vw, 760px" data-astro-cid-ybdj54xn="true" loading="lazy" decoding="async" width="1330" height="778"><figcaption data-astro-cid-ybdj54xn>A contact sheet. The rain cloud is flagged for holes, but they&#39;re between the raindrops, so it&#39;s fine.</figcaption></figure>
<p>A flag doesn’t mean something is wrong, just that I should look at it. Last time I ran them all, about 14 percent of the stickers were flagged, most of them for being small or having holes. I go through them and fix whatever is actually wrong.</p>
<p>Whether the jacket looks right on the doll is the five-year-old’s job. I had planned to build a tool for that as well, but it was never needed. If something doesn’t fit, she tells me and asks me to fix it.</p>
<figure class="bilde" style="--vri:2deg; --tape:rgb(222 240 214 / 0.92)" data-astro-cid-ybdj54xn><span class="teip" aria-hidden="true" data-astro-cid-ybdj54xn></span><img src="https://sandkassa.app/_astro/monster.CXVDwBz6_Z1engOT.webp" srcset="https://sandkassa.app/_astro/monster.CXVDwBz6_ZFUsCY.webp 480w, https://sandkassa.app/_astro/monster.CXVDwBz6_1AXP9A.webp 800w, https://sandkassa.app/_astro/monster.CXVDwBz6_Gy8zX.webp 1200w" alt="A child's finger moving a green monster sticker on a purple space page in Klistre" sizes="(max-width: 760px) 92vw, 760px" data-astro-cid-ybdj54xn="true" loading="lazy" decoding="async" width="1400" height="1050"><figcaption data-astro-cid-ybdj54xn>The testing department at work.</figcaption></figure>
<h2 id="only-one-step-is-ai">Only one step is AI</h2>
<p>An image model never does quite the same thing twice. You saw it on the face in the first demo. That’s fine for coming up with a fire jacket, but not for cutting out thousands of stickers the same way.</p>
<p>So in the pipeline below, only one step is AI. The dolls and backgrounds are drawn by a model too, but that’s another story. Everything after the picture is drawn is done by ordinary scripts here on my Mac, with no online services. What runs is plain Python, mostly Pillow, NumPy and SciPy. Of course I use AI to help me with the code too, but that’s a very different thing from letting AI make the pictures themselves. Two different ways of using AI.</p>
<p><em>There is a demo here you can try yourself.</em> <a href="https://sandkassa.app/en/workshop/green-screen-for-stickers">Try it on the website</a>.</p>
<p>I think that’s the trick with AI. The image model isn’t deterministic, but the code is, whoever helped write it. The scripts are fast and cheap, I can test them, and if I run them again tomorrow, I get the same answer.</p>
<aside class="lapp" style="--bg:#e7f3e1; --vri:-1deg" data-astro-cid-gepgxjvg><p class="lapp-tittel" data-astro-cid-gepgxjvg>What I learned</p><div class="lapp-tekst" data-astro-cid-gepgxjvg><p>Don’t use AI for everything. There are good algorithms and ready-made tools for almost everything, and good old-fashioned code is often the best choice.</p><p>Let the model do what only it can, like drawing a fire jacket. The rest is better off as code.</p></div></aside>
<p>If you want to see how it turned out, you can read more about <a href="https://sandkassa.app/en/apps/klistre">Klistre</a> and try it yourself. The first 20 pages are free, with nearly 500 stickers, so there’s plenty to play with, whether you’re curious about the result yourself or have kids at home who can test it for you.</p>]]></content:encoded></item><item><title>What counts as a correctly formed letter?</title><link>https://sandkassa.app/en/workshop/what-counts-as-a-correctly-formed-letter</link><guid>https://sandkassa.app/en/workshop/what-counts-as-a-correctly-formed-letter</guid><pubDate>Sat, 07 Nov 2026 11:00:00 GMT</pubDate><description>I set out to make a writing app for my daughters, and found out I'd been writing the Norwegian ø wrong my whole life.</description><content:encoded><![CDATA[<p>Our eldest daughter wanted to write cards to her grandparents. She asked us to write the words on a sheet of paper so she could copy them. That turned into a lot of sheets.</p>
<p>So I went looking for an app. Most of what I found was American, with annoying characters and a lot of nagging. And I wanted her to learn the letters the way she’ll meet them when she starts school next autumn. The Norwegian way, that is, with æ, ø and å. I thought I’d just make one myself. How hard could it be. I just had to find out what’s actually correct first.</p>
<h2 id="what-do-the-schools-say">What do the schools say?</h2>
<p>The Norwegian curriculum doesn’t say which style of handwriting children should learn. It says they should have “functional handwriting”, and that’s about it. There used to be a requirement for a specific style, but it was dropped in 2020.</p>
<p>The closest thing to an official answer is a set of instructional videos the Norwegian Reading Centre made for teachers. They go through every letter, where you start and which way you go, and a lot of schools follow them.</p>
<p>I watched the videos and had a few surprises, the biggest one being ø (an o with a slash through it). The slash in ø is supposed to go from the bottom up. I’ve drawn it from the top down my whole life.</p>
<p><em>There is an animation here. Two letters ø being written. In the school’s version the slash goes from the bottom up, in mine from the top down.</em> <a href="https://sandkassa.app/en/workshop/what-counts-as-a-correctly-formed-letter">See it on the website</a>.</p>
<p>The reason is that children later move on to joined-up writing. A stroke that goes up becomes the start of the next letter. So it does matter which way you go, even if the ø looks the same once it’s done.</p>
<h2 id="strict-about-the-start">Strict about the start</h2>
<p>That more or less became the rule for the whole app: Snirkel is strict about where the finger goes down and which way it moves, and relaxed about how neat the line turns out.</p>
<img src="https://sandkassa.app/_astro/snegl.Co0jYt0L_Z1D19k1.webp" srcset="https://sandkassa.app/_astro/snegl.Co0jYt0L_zvhOf.webp 130w, https://sandkassa.app/_astro/snegl.Co0jYt0L_Z2h4FPy.webp 260w" alt sizes="130px" style="--s:130px; --vri:-6deg" data-astro-cid-mxjqy64l="true" loading="lazy" decoding="async" width="578" height="420" class="figur hoyre">
<p>In Snirkel, a snail shows where the letter starts and crawls along with the finger. If the child starts in the wrong place, the snail looks puzzled, says “hm?”, and the letter gives a gentle shake. There’s never an error sound. If the finger goes the wrong way, nothing happens at all, and the child works it out on their own.</p>
<p>The starting dot is never smaller than a fingertip, however thin the track (the pale letter the child traces over) gets. Hitting a tiny dot isn’t what they’re practising. And if the finger slips off right at the end of a stroke, the stroke still counts. Nobody should have to start again because of the last few millimetres.</p>
<figure class="bilde bred" style="--vri:-1.5deg; --tape:rgb(251 221 228 / 0.92)" data-astro-cid-ybdj54xn><span class="teip" aria-hidden="true" data-astro-cid-ybdj54xn></span><img src="https://sandkassa.app/_astro/a-forste-strek.B4XBwCgM_Z1QseDC.webp" srcset="https://sandkassa.app/_astro/a-forste-strek.B4XBwCgM_Z1Hh9J6.webp 480w, https://sandkassa.app/_astro/a-forste-strek.B4XBwCgM_2tXnwy.webp 800w, https://sandkassa.app/_astro/a-forste-strek.B4XBwCgM_Z1QseDC.webp 1200w" alt="A big A in Snirkel. The upstroke is filled in red and the snail sits at the top. A dotted arrow shows the way back down, and the numbers 1 and 2 show the order. Next to it, a monkey with a thought bubble that says 'A for ape' (ape is Norwegian for monkey)." sizes="(max-width: 760px) 92vw, 760px" data-astro-cid-ybdj54xn="true" loading="lazy" decoding="async" width="1200" height="827"><figcaption data-astro-cid-ybdj54xn>A, first stroke. Up, then back down. The five A&#39;s at the top are the ones the child will write.</figcaption></figure>
<h2 id="she-wanted-it-harder">She wanted it harder</h2>
<p>The first version was too easy. My five-year-old wanted it harder than I’d made it, so I changed the app.</p>
<p>Now the child writes each letter five times, and the track gets a little narrower each time, so you have to be more careful. At first you can lift your finger and carry on where you stopped. Once you’ve written the letter a few times, each stroke has to be done in one go. And for the last two rounds the track is gone, and there’s only a thin dotted line to follow.</p>
<p>The track was also too wide to begin with. The holes in a and e almost disappeared, and it was more a blob to colour in than a letter to write. It’s a quarter narrower now.</p>
<p>If a child has tried the same letter three times in a day without finishing, the track gets wider next time, and the rounds without a track are skipped. The app doesn’t say anything about it; it just gets a bit easier.</p>
<h2 id="the-little-one-would-rather-colour">The little one would rather colour</h2>
<p>When my three-year-old tried the same thing, it was far too hard. She doesn’t have the finger control yet. So she got a mode of her own, where she can draw freely and colour in the letters, and it turned into a way of playing with letters. She loved it. She filled up the whole shelf with letters before I’d really noticed. She’s quick.</p>
<figure class="bilde" style="--vri:1.5deg; --tape:rgb(255 240 194 / 0.9)" data-astro-cid-ybdj54xn><span class="teip" aria-hidden="true" data-astro-cid-ybdj54xn></span><img src="https://sandkassa.app/_astro/finger-pa-e.CuyKOQbT_jRmE4.webp" srcset="https://sandkassa.app/_astro/finger-pa-e.CuyKOQbT_Z1uVhME.webp 480w, https://sandkassa.app/_astro/finger-pa-e.CuyKOQbT_1NhKjI.webp 800w, https://sandkassa.app/_astro/finger-pa-e.CuyKOQbT_1imfpK.webp 1200w" alt="A child's hand on the iPad. The index finger is colouring a big E yellow, and the snail sits at the top." sizes="(max-width: 760px) 92vw, 760px" data-astro-cid-ybdj54xn="true" loading="lazy" decoding="async" width="1400" height="966"><figcaption data-astro-cid-ybdj54xn>The colouring level. The E is turning yellow.</figcaption></figure>
<p>So now Snirkel has three levels, and you pick one for each child. The first one is hers: the child colours in the letter in whatever order they like, just to get to know the shape. The second is capital letters, with the right start and direction, because from what I’ve seen, capitals are what most children learn first. On the third, the child switches between capital and small letters.</p>
<p>There are no points and no stars to collect. When a letter is done there’s a little celebration, it goes up on a shelf in the app, and that’s it.</p>
<figure class="bilde" style="--vri:-2deg; --tape:rgb(221 235 250 / 0.92)" data-astro-cid-ybdj54xn><span class="teip" aria-hidden="true" data-astro-cid-ybdj54xn></span><img src="https://sandkassa.app/_astro/regnbue-b.Dopy75Yn_Zaf64a.webp" srcset="https://sandkassa.app/_astro/regnbue-b.Dopy75Yn_1j2Wcb.webp 480w, https://sandkassa.app/_astro/regnbue-b.Dopy75Yn_1Mwa2F.webp 800w, https://sandkassa.app/_astro/regnbue-b.Dopy75Yn_voyPX.webp 1200w" alt="A child's hand on the iPad. Behind a finished B there's a rainbow and balloons." sizes="(max-width: 760px) 92vw, 760px" data-astro-cid-ybdj54xn="true" loading="lazy" decoding="async" width="1400" height="1188"><figcaption data-astro-cid-ybdj54xn>B is done, so there&#39;s a party.</figcaption></figure>
<h2 id="and-then-paper">And then paper</h2>
<p>Children should write on paper too, not just on a screen. You hold a pencil differently, and it catches on paper in a way glass never does. Snirkel can teach where a letter starts and which way it goes, but the rest has to be practised on paper.</p>
<p>So at home they write on paper too. We’ve made a set of sheets with the letters, laminated them, and the girls write on them with whiteboard markers. The plan is that you’ll be able to download the sheets and print them yourself from the app in the next update. Stay tuned.</p>
<aside class="lapp" style="--bg:#fff6d9; --vri:1deg" data-astro-cid-gepgxjvg><p class="lapp-tittel" data-astro-cid-gepgxjvg>Away from the screen</p><div class="lapp-tekst" data-astro-cid-gepgxjvg><p>Write in the sand with a stick, or with chalk on the pavement. A plain sheet of paper works too.</p><p>Many Norwegian schools talk about the letters as a house. Most small letters live in the living room. Some reach up into the attic, and some hang down into the cellar. If you use the same words at home, your child will recognise them at school.</p></div></aside>
<p>I’m not a teacher. I’ve read what I’ve found about handwriting in Norwegian schools and followed it as closely as I can, but I’m sure there’s something I’ve misunderstood. If you spot anything, I’d like to hear about it.</p>
<p>The app is in Norwegian, made for Norwegian families.</p>]]></content:encoded></item></channel></rss>