Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I do a cookie cutter?
#1
I have an arbitrary shape (template) defined as an image that is transparent (alpha) wherever the shape isn't. There can be multiple disconnected transparent areas. As a simple example, imaging a donut shape that is transparent where the donut hole is, and also transparent outside of the donut. I want to apply this shape to other images such that the other image will be modified to be fully transparent in the same areas that the template is transparent. Thus using this as a cookie cutter of sorts. Is there a simple way to do this with Gimp (3)? 
TIA!
Reply
#2
Typically you can use a layer mask to define transparent (black) / opaque (white) areas.
see: https://docs.gimp.org/3.0/en/gimp-layer-mask-add.html

You can get there by a copy / paste or since you have a template with transparency, you can use the template alpha channel. The options are in Layer -> Mask -> Add Layer Mask.

   

There are other ways, using a selection from the template for example, adjusting the selection position / size using unified transform tool then copy / paste as required.
Reply
#3
Ah! Layer mask! That seems to be exactly what I was looking for. Thank you. Smile
Reply
#4
The canonical technique in Gimp 2.10 and Gimp3 is to set the image layer above the shape layer and to set the image layer's "Composite mode" to Clip to backdrop. You can keep both layers in a layer group to limit the scope of Clip to backdrop:

   

This technique allows you to move the layers around later to adjust the position of the cut.
Reply


Forum Jump: