edu.uci.ics.jung.visualization.util
Class ImageShapeUtils
- java.lang.Object
-
- edu.uci.ics.jung.visualization.util.ImageShapeUtils
-
public class ImageShapeUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description ImageShapeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.awt.ShapegetShape(java.awt.image.BufferedImage image, int max)Given an image, possibly with a transparent background, return the Shape of the opaque part of the image If the image is larger than max in either direction, scale the image down to max-by-max, do the trace (on fewer points) then scale the resulting shape back up to the size of the original image.static java.awt.ShapegetShape(java.awt.Image image)Given an image, possibly with a transparent background, return the Shape of the opaque part of the imagestatic java.awt.ShapegetShape(java.awt.Image image, int max)static java.awt.ShapegetShape(java.lang.String fileName)Given the fileName of an image, possibly with a transparent background, return the Shape of the opaque part of the imagestatic java.awt.ShapegetShape(java.lang.String fileName, int max)Given the fileName of an image, possibly with a transparent background, return the Shape of the opaque part of the image
-
-
-
Method Detail
-
getShape
public static java.awt.Shape getShape(java.lang.String fileName)
Given the fileName of an image, possibly with a transparent background, return the Shape of the opaque part of the image- Parameters:
fileName- name of the image, loaded from the classpath- Returns:
- the Shape
-
getShape
public static java.awt.Shape getShape(java.lang.String fileName, int max)Given the fileName of an image, possibly with a transparent background, return the Shape of the opaque part of the image- Parameters:
fileName- name of the image, loaded from the classpathmax- the maximum dimension of the traced shape- Returns:
- the Shape
- See Also:
getShape(Image, int)
-
getShape
public static java.awt.Shape getShape(java.awt.Image image)
Given an image, possibly with a transparent background, return the Shape of the opaque part of the image- Parameters:
image- the image whose shape is to be returned- Returns:
- the Shape
-
getShape
public static java.awt.Shape getShape(java.awt.Image image, int max)
-
getShape
public static java.awt.Shape getShape(java.awt.image.BufferedImage image, int max)Given an image, possibly with a transparent background, return the Shape of the opaque part of the image If the image is larger than max in either direction, scale the image down to max-by-max, do the trace (on fewer points) then scale the resulting shape back up to the size of the original image.- Parameters:
image- the image to tracemax- used to restrict number of points in the resulting shape- Returns:
- the Shape
-
-
DataMelt 3.0 © DataMelt by jWork.ORG