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(org.locationtech.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 org.locationtech.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(org.apache.commons.httpclient.HttpMethod method,
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(org.apache.commons.httpclient.HttpMethod method, String mime) throws Exception
method - Apache HttpClient GetMethod objectmime - String representing the mime type of the image.Exception - if anypublic static void writeImage(BufferedImage image, String mime, OutputStream os) throws Exception
image - image to be sent to the client.mime - String representing the mime type of the image.os - DataWrapper used to write the image.Exception - if anypublic 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(org.locationtech.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 org.locationtech.jts.geom.Geometry geometrieFromText(String wktgeom, int srid)
public static BufferedImage combineImages(List<ReferencedImage> images, String mime, Integer width, Integer height)
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)public static String getMimeType(String mime)
mime - String with the MIME to find.public static BufferedImage changeColor(BufferedImage im, Color color, Color newColor)
Copyright © 2019. All rights reserved.