Skip to content
  • Author Owner

    This was "vibe-coded" using GitLab Duo Chat. Here's the prompt that I gave it:

    help me write a GIMP script to put a white border around the outline of a picture that has a transparent background, so that it's outline is visible when placed on a dark background.

    The basic approach that I see is

    1. add a layer for the image, with a transparent background
    2. move the image into that layer, from the default layer
    3. Select all the image that is not the transparent background
    4. scale the sellection some specified number of pixels larger
    5. Add a new layer for the outline, with a transparent background
    6. in the new layer fill the selection with white
    7. Reverse the layers so that the white border is behind the original image
    Edited by MikeL
  • Author Owner

    You can see an example result:

    • java_duke_waves.xcf Is a GIMP image with the layers that were created by the script
    • java_duke_waves.png is the final image exported to PNG, so that GitLab can render it in this snippet
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment