Java Utililty Methods BufferedImage to Shape

List of utility methods to do BufferedImage to Shape

Description

The list of methods to do BufferedImage to Shape are organized into topic(s).

Method

ShapeimageToShape(BufferedImage image)
image To Shape
Area area = new Area();
Rectangle rectangle = new Rectangle();
int y1, y2;
for (int x = 0; x < image.getWidth(); x++) {
    y1 = Integer.MAX_VALUE;
    y2 = -1;
    for (int y = 0; y < image.getHeight(); y++) {
        int rgb = image.getRGB(x, y);
...
ShapeimageToShape(BufferedImage image)
image To Shape
Area area = new Area();
int width = image.getWidth();
int height = image.getHeight();
int[] imgData;
int type = image.getType();
if (type == BufferedImage.TYPE_INT_ARGB_PRE || type == BufferedImage.TYPE_INT_RGB) {
    imgData = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
} else {
...
ShapeimageToShapeOld(BufferedImage image)
image To Shape Old
Area area = new Area();
Rectangle rectangle = new Rectangle();
int y1, y2;
int width = image.getWidth();
int height = image.getHeight();
int[] imgData;
int type = image.getType();
if (type == BufferedImage.TYPE_INT_ARGB_PRE || type == BufferedImage.TYPE_INT_RGB) {
...