public class ImageTool extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
GIF |
static String |
JPEG |
static String |
PNG |
static String |
TIFF |
| Constructor and Description |
|---|
ImageTool() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedImage |
changeColor(BufferedImage im,
Color color,
Color newColor) |
static BufferedImage |
combineImages(List<ReferencedImage> images,
String mime,
Integer width,
Integer height)
Method which handles the combining of the images.
|
static Shape |
createImage(com.vividsolutions.jts.geom.Geometry geometrie,
int bboxSrid,
Bbox bbox,
int width,
int height) |
static BufferedImage |
drawGeometries(BufferedImage bi,
CombineImageSettings settings) |
static BufferedImage |
drawGeometries(BufferedImage bi,
CombineImageSettings settings,
int srid,
Bbox bbox,
int width,
int height) |
static com.vividsolutions.jts.geom.Geometry |
geometrieFromText(String wktgeom,
int srid) |
static String |
getMimeType(String mime)
Private method which seeks through the supported MIME types to check if a
certain MIME is supported.
|
static BufferedImage |
readImage(InputStream is,
String mime)
Reads an image from an http input stream.
|
static Point |
transformToScreen(Point source,
int bboxSrid,
Bbox bbox,
int width,
int height) |
static void |
writeImage(BufferedImage image,
String mime,
OutputStream os)
First combines the given images to one image and then sends this image
back to the client.
|
public static final String TIFF
public static final String GIF
public static final String JPEG
public static final String PNG
public static BufferedImage readImage(InputStream is, String mime) throws Exception
method - Apache HttpClient GetMethod objectmime - String representing the mime type of the image.Exceptionpublic static void writeImage(BufferedImage image, String mime, OutputStream os) throws Exception
images - BufferedImage array with the images tha have to be combined
and sent to the client.mime - String representing the mime type of the image.dw - DataWrapper object in which the request object is stored.Exceptionpublic static BufferedImage drawGeometries(BufferedImage bi, CombineImageSettings settings) throws Exception
Exceptionpublic static BufferedImage drawGeometries(BufferedImage bi, CombineImageSettings settings, int srid, Bbox bbox, int width, int height) throws Exception
Exceptionpublic static Shape createImage(com.vividsolutions.jts.geom.Geometry geometrie, int bboxSrid, Bbox bbox, int width, int height) throws Exception
Exceptionpublic static Point transformToScreen(Point source, int bboxSrid, Bbox bbox, int width, int height) throws Exception
Exceptionpublic static com.vividsolutions.jts.geom.Geometry geometrieFromText(String wktgeom, int srid)
public static BufferedImage combineImages(List<ReferencedImage> images, String mime, Integer width, Integer height) throws Exception
images - BufferedImage array with the images tha have to be
combined.mime - String representing the mime type of the image.width - the width of the result image (or null if the width of the
first image must be used)height - the height of the result image (or null if the width of the
first image must be used)Exceptionpublic static String getMimeType(String mime)
mime - String with the MIME to find.public static BufferedImage changeColor(BufferedImage im, Color color, Color newColor)
Copyright © 2015. All rights reserved.