154 reads

The Glorious, Glitchy Joy of Prompting AI for PNG Transparency

by Marcio S GalliApril 21st, 2025
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

To materialize things we imagine first, or we draw. Or designers draw. Then we too break things apart, to materialize other dynamic things - web developers do that. Now, designing with AI, we can not only materialize but also co-design in new ways. Here is a story of using Gpt to generate images with transparency (alpha channel) - and a reflection about us now required to be innocent, like artists.
featured image - The Glorious, Glitchy Joy of Prompting AI for PNG Transparency
Marcio S Galli HackerNoon profile picture


Oh, how I wish you could see what I see in this next image. But there are ways to hack-and-see, developers know. Since what I am about to tell you is enlightening in many ways, I ask you to pause, breathe, and try to imagine stars behind that windshield. Well, or you can simple access Hackernoon’s feature to turn on/off lights. Or, you can hack the way web developers know, by going to developer tools in your desktop browser, pick the element that holds the image, and add/change a background color value:


Yellow alert - windshield transparent - made with Gpt 4o. On the right, yours old chunk of Silicon Valley coal, on fire.



So that’s it, Gpt Plus did that for us. So a lot changes there, right? But let's relax and revisit how that story goes - as web developers know it - so that such good moment can be longer. Let us start with AI helping us to materialize things, images:

AI generating images, materializing

So there I was, together with you, using AI to materialize things. That is amazing, we know. And next, we then pick these material things, we give use to them. We have seen that, elsewhere on the web and also at home. My niece always ask for a drawing to paint. But yesterday, she gave my wife precise instructions, a prompt:


I want a little teddy bear in a baby stroller, with a blanket, a rattle, and a binky.




Gpt Plus generated drawing, designed by Maya and Marcio's prompt.



That’s new for me, for us. Meanwhile Maya is painting. So we are materializing things, interactively, through iteration. And the same for them, web developers. Let’s see then my “web developer” situation, before Gpt could help out with that transparency work:

Materializing a laptop with a “transparent screen“

 On the left, the green area simulates what would be the transprency (alpha) channel



Before the new-new approach for editing (with transparency), the job consisted of designing with AI. Give me a sleek laptop image over a white background, I would ask. Then I would walk in to that good old “photo shop” room to start other job - of breaking down things so later to put things back together, rematerializing other experiences.


With that job done, as an example, I was able to enhance storytelling in articles. Next is another example of an old web page screen capture - back from the good old days of the web - which was inserted into an old computer display:

An old web page, originally from web archive, inside an old Samsung display.


Back to the future

But a reason for this article - with the spoiler already given - is something else. An important point connects with the moment of my discovery. By an accident. Yes, I mistakenly didn’t follow the route, that old professional. Strictly speaking, I slipped up. Naively, or innocently, I asked for. Out of the sudden:


Could you give me that star ship main room with the windshield display transparent (PNG transparent)


And I witnessed the tool rendering. And I was sure, that is just an image. But let’s try to save it to see. But as I “moused over it” I witnessed that good old grid behind the image:


Good work, OpenAI folks, for putting a grid behind the generated image.


If the idea is about pausing - and to enjoy this happy moment - I would say thanks to Open AI team for having placed that image on top of a grid. I helped me to believe. With that, we are good to what is next. What is next? More.

Where we going we don’t need roads

So he was too happy with the results. Oh, transparent windows. Give me a car’s view from inside with that PNG-alpha transparent windshield. Give me a jet fighter cockpit view. His adult doer, his web developer, was now materializing things. So now he wanted to make that star ship master room thing to work.


Yes, yellow alert, red alert, and 16.7 million different alerts. So here we are, witnessing the developer-doer, having saved the time with that windshield job, now craving for a new job:


I want ambiance lighting!


And before thinking - or being innocent again - he was back on track, back to his old “photo shop” room, and manually painting the “glowing parts” with that transparent ink he wanted so badly:


Yellow alert, the use case


And he slept on it. But thank God the next day, strictly speaking, he slipped again:


Could you give me the image again but now with the glowing light areas ALSO in PNG-alpha transparency?


And what came next, for now and according to Gpt Plus 4o, wasn’t what he wanted. It kept on giving him the windshield transparent, again and gain. No transparency applied to the lighting areas. So he was sad. But he was happy. He was half happy and half sad. And this is how this story ends.


The end


But wait, and before we close, he had felt a lightening strike - like a 1.6 gigawatts) - a semi-innocent enlightening moment:


Could you, perhaps, give me then the very same image but with the glowing effects in white?


So that’s it. He had now two images side by side. He had the pixels he so much wanted. And he too was fascinated by two things. First because he didn’t think the model would would be able, let’s say, to clone an image adding variations on it. That was surprising. But too, fascinated by his own moments of innocence, being able to let that old doer on the side.


on the left, the glowing I needed. On the right, transparent wind shield



So as for the job I was doing - of a developer feeling like a producer - I end up back to that “photo shop” garage, and working on sticking the glowing pixel parts into the alpha/transparency channel. The right hand side is a forced case - green alert. On the left hand, is the real thing. Just enjoy:


The final PNG image with transparency to the windshild and lighting areas.


To be continued…


Meanwhile check it out the developer’s video about usnig Gpt and Transparent images.


Trending Topics

blockchaincryptocurrencyhackernoon-top-storyprogrammingsoftware-developmenttechnologystartuphackernoon-booksBitcoinbooks