Class ImageShapeUtils
java.lang.Object
edu.uci.ics.jung.visualization.util.ImageShapeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Shape
Given an image, possibly with a transparent background, return the Shape of the opaque part of the imagestatic Shape
getShape
(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 Shape
static Shape
Given the fileName of an image, possibly with a transparent background, return the Shape of the opaque part of the imagestatic Shape
Given the fileName of an image, possibly with a transparent background, return the Shape of the opaque part of the image
-
Constructor Details
-
ImageShapeUtils
public ImageShapeUtils()
-
-
Method Details
-
getShape
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
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
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
-
getShape
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
-