public Image takeSnippet(Rectangle bounds) {
		int margin = 20;
		int topMargin = 4;
		padImage(Colors.BACKGROUND, 0, margin, 0, margin);
		int rise = 8;
		bounds.width += 2 * margin;

		GeneralPath topPath = new GeneralPath();
		GeneralPath bottomPath = new GeneralPath();
		GeneralPath path = new GeneralPath();
		int centerx = bounds.x + bounds.width / 2;

		topPath.moveTo(0, rise + topMargin);
		topPath.lineTo(centerx, topMargin);
		topPath.lineTo(centerx - rise, 2 * rise + topMargin);
		topPath.lineTo(bounds.width, rise + topMargin);

		bottomPath.moveTo(bounds.width, bounds.height + 3 * rise + topMargin);
		bottomPath.lineTo(centerx - rise, bounds.height + 4 * rise + topMargin);
		bottomPath.lineTo(centerx, bounds.height + 2 * rise + topMargin);
		bottomPath.lineTo(0, bounds.height + 3 * rise + topMargin);

		path.append(topPath, true);
		path.append(bottomPath, true);
		path.closePath();

		bounds.y -= 2 * rise + topMargin;
		bounds.height += 4 * rise + 2 * topMargin;
		crop(path, bounds);

		Graphics2D g2 = (Graphics2D) image.getGraphics();

		g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

		g2.setColor(Color.BLACK);
		g2.setStroke(new BasicStroke(3f));
		g2.draw(topPath);
		g2.draw(bottomPath);
		return image;
	}
Crops a part of the current image, keeping what is inside the given bounds. This method
creates a shape such that the top and bottom of the cropped image have a jagged line, looking
somewhat like a sideways lightening bolt.

@param bounds the bounds to keep
@return the snippet
Ghidra/Features/Base/src/main/java/help/screenshot/AbstractScreenShotGenerator.java