# Thread: Graphics 2D Shape Cutter for BufferedImages

1. Senior Member
Join Date
Apr 2014
Location
United Kingdom
Posts
176
Rep Power
2

## Graphics 2D Shape Cutter for BufferedImages

I'm going to make tiles for my RPG game, instead of drawing each shape of the tile, I will just draw the full tile in a spritesheet. I will create a sprite sheet of shapes that I want to clip somehow or use to cut the original full image into the shape I want. How can I, take a Buffered Image, cut it's shape and perhaps add something, giving me a Buffered Image of a cut tile with possibly added features that I can then draw with Graphics?

Regards
Augustas

2. Senior Member
Join Date
Jan 2013
Location
Northern Virginia, United States
Posts
4,630
Rep Power
7

## Re: Graphics 2D Shape Cutter for BufferedImages

I don't understand what you want. It seems to me that drawing different shapes into images
is about the same as drawing the cutter pattern to cut the shapes.

Regards,
Jim

3. Senior Member
Join Date
Apr 2014
Location
United Kingdom
Posts
176
Rep Power
2

## Re: Graphics 2D Shape Cutter for BufferedImages

Okay, ermm imagine you have a 16 x 16 square red image, and then you have another image that is also 16 x 16, one 8 x 16 half is transperant, the other 8 x 16 half is black, how can I use these two images together somehow to get a BufferedImage that now is a an image that the first half is red and the other is transperant. How to explain, I'll use images as examples:

So literally, the first image is a BufferedImage, the second image is a bufferedImage, the black borders surrounding the images in this example don't count as part of the image, the result image is also a buffered image. So basically the cutter shape is the second image. How can I do this process? Input two images, the second image's all black parts will be used as a position for turning the first image's parts transperant. How do I do this? Is it possible? How?

Regards
Augustas

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•