My thoughts on Slackware, life and everything

Using Claude to create a work of art

© 2026 Eric Hameleers. All Rights Reserved.

Take the “work of art” with a grain of salt please 🙂 This is an article about computer-generated art but with my own photographs as the source material.

In May, the last of our four cats died. They were two pairs of Holy Birmans, first two little sisters who we took in when they were only 7 weeks old; and later two big brothers whom we adopted when they were over 8 years old.
For the first time in 30 years we do not have any cat in the house. It is silent and sometimes desolate, and I miss the little fluff-balls. But we need to be realistic – we also want to see more of the world and having cats means you need to take care of their well-being. These four are it. There will not be future cats.

Me and my wife decided we wanted to commemorate them by creating some kind of artwork and put that up on the living room wall. We wanted their pictures, and since they were four very different cats, we looked for defining features and old photos that showed their uniqueness. We succeeded in that part, but then came the question, what form and shape should this take? The pictures had different backgrounds, the lighting created different colors, the cats in the pictures had different sizes.

I came up with the idea to create solarized versions of these pictures, give them a kind of Warhol effect with primary colors and bold planes. I looked into ImageMagick, and could not find a good way forward. I looked at online AI image generators and manglers, and none of that was any good either, no consistency in the results.

So I turned to Anthropic’s Claude chat bot. I started with a simple question:

I have four pictures of my cats. I need the cats without the background and primarily the cat heads and/or bodies in a composite picture, which has the solarized style of an Andy Warhol painting

To which the bot responded (it knows I work on Slackware):

Good news: this is very achievable with a Python script using a couple of well-suited libraries, and you can run it entirely on your Slackware machine. Here’s the plan:
Tool stack:

rembg – AI-powered background removal (uses a U2Net model), works excellently on pets/animals. This is the part where ImageMagick would genuinely struggle.
Pillow (PIL) – for cropping, compositing, posterizing, colorizing, and assembling the grid.
Both installable via pip.

The pipeline per cat photo:

Remove background with rembg (outputs a clean RGBA PNG)
Auto-crop to the cat’s bounding box (head/body)
Posterize (reduce to ~4 color levels) to get that flat, graphic look
Apply a flat color tint per panel (Warhol used vivid, clashing hues)
Arrange all four panels in a 2×2 grid

What I need from you to write the script:

Confirm you can install Python packages via pip on your Slackware machine (or in a venv)
Any preference on output size (e.g. 2000x2000px total, so 1000×1000 per panel)?
Do you want each cat in a different color scheme, or the same cat repeated Warhol-style (like the Marilyn print where it’s one subject, four colorways)?
Should the background of each panel be a solid flat color, or transparent/black?

Once you confirm, I’ll write you a clean, self-contained Python script that takes your four JPEGs as input and produces a single composite PNG.

I checked that I could indeed install the dependencies without any issue. I gave it some additional information:

I can install any package using pip, no problem. The image dimensions of 2000×2000 sounds fine.
Each cat should have a different primary color and I would like to associate the four input pictures with specific colors myself. The background is a good question, since I do not yet know what will give the best result. For now I would go with a gradient background that contrasts with the primary colors I will select for the cats and potentially add some smudging to that background.

That produced a script in a few seconds that actually did everything I had imagined for the resulting bitmap wich consisted of 4 panels in a 2×2 grid, one solarized cat image per panel.

Of course, then the creative mind wanted more. It is interesting how this works. I have ideas, I conceptualize them into a prompt, the AI returns Python code that evolves with every new question I have, and actually every iteration of the script does everything I wanted from it.
Eventually, the script was capable of a lot more, tweaks that created better and visually more pleasing versions of the WarholCats.

What was added during this “discussion”:

  • Per-panel configuration:
    • Define the primary color (required) and optionally specify a different background color than the default color complement of the foreground.
    • An optional (x,y) offset to place each cat squarely in the panel’s center.
    • Background styles, several gradients are possible: diagonal, vertical, horizontal, radial; as well as a simple monochrome background.
  • The bot documented all of these configurable parameters in a PANELS block. All parameters were given sensible fallback values in case they are not provided.
  • Optionally a black outline drawn around the cats to make them stand out more – looks better against a monochrome background.
  • Three layouts: a 2×2, 4×1, or 1×4 canvas.
  • The script has defaults set for my wallmount project (I intend to have the result directly printed on dibond aluminium): my LAYOUT = “4×1” and PANEL_SIZE = 2000, allowing for roughly 127 dpi when the image is applied to a 160×40 cm dibond.

Variables like FILL_FRACTION (defaulting to 0.90) and PADDING_FRACTION (defaulting to 0.06), allow for a middle ground for the framing of the cat images. Eventually I also needed an OFFSET variable to move individual cat images into the center of their panel.
The result is the picture at the top of this article. The Python script can be found in the Slackware Forge: https://forge.slackware.nl/alienbob/randomstuff/src/branch/main/WarholCats/warhol_cats.py
The four original cat photos are attached to this blog:

© 2026 Eric Hameleers. All Rights Reserved.

© 2026 Eric Hameleers. All Rights Reserved.

© 2026 Eric Hameleers. All Rights Reserved.

© 2026 Eric Hameleers. All Rights Reserved.

That’s it for today. I wanted to share how a Large Language Model like Anthropic’s Claude is able to boost your creativity with respect for your precious free time. No… this is not vibe coding. The Python code is simple and clean, and is easy to follow. No weird functionality, and proper inlined comments all over.
Feel free to use the script as you see fit. I would however appreciate that you do not share the pictures of my cats or the resulting solarized bitmap any further. The images are copyrighted.
Cheers, Eric

1 Comment

  1. Jen

    I’m sorry to hear about your kitty… We’ve been there and it sucks, to put it mildly.

    See, this is the use of AI I don’t have a problem with–it’s inspired by Warhol, but isn’t just stealing from it, rather you used it as a tool to create something new using ethical (your own) sources. (in a sense, is it any different if I ask a friend, “Hey, you got a better idea how I could write this function?”)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2026 Alien Pastures

Theme by Anders NorenUp ↑