public class JAIImageConverter extends AbstractImageConverter implements ImageConverter
| Constructor and Description |
|---|
JAIImageConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected static javax.media.jai.PlanarImage |
border(javax.media.jai.PlanarImage inImg,
int xpadding,
int ypadding)
Performs the 'border' operation:
Adds a border to an image using the specified horizontal and vertical padding.
|
byte[] |
convertImage(byte[] input,
String sourceFormat,
List<String> commands)
This functions converts an image by the given parameters
|
protected static javax.media.jai.PlanarImage |
crop(javax.media.jai.PlanarImage inImg,
int x1,
int y1,
int x2,
int y2) |
protected static javax.media.jai.PlanarImage |
flip(javax.media.jai.PlanarImage inImg)
Performs the 'flip' or 'flipy' operation:
Flip an image across an imaginary vertical line that runs through the center of the image.
|
protected static javax.media.jai.PlanarImage |
flop(javax.media.jai.PlanarImage inImg)
Performs the 'flop' or 'flipx' operation:
Flip an image across an imaginary horizontal line that runs through the center of the image.
|
void |
init(Map<String,String> params) |
protected static javax.media.jai.PlanarImage |
loadImage(String filename) |
protected static javax.media.jai.PlanarImage |
negate(javax.media.jai.PlanarImage inImg)
Performs the 'dia' or 'negate' operation.
|
protected static javax.media.jai.PlanarImage |
rotate(javax.media.jai.PlanarImage inImg,
int x,
int y,
int a)
Performs the 'rotate' operation: rotates an image.
|
protected static javax.media.jai.PlanarImage |
size(javax.media.jai.PlanarImage inImg,
int width,
int height,
boolean maintainAspectRation)
Performs the 's' or 'geometry' operation:
Resize an image using specified width and height.
|
convertImageclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertImagepublic void init(Map<String,String> params)
init in interface ImageConverterinit in class AbstractImageConverterImageConverter.init(java.util.Map)public byte[] convertImage(byte[] input,
String sourceFormat,
List<String> commands)
ImageConverterconvertImage in interface ImageConverterconvertImage in class AbstractImageConverterinput - an array of byte which represents the original imagesourceFormat - original image formatcommands - a List of Strings containing commands which are operations on the image which will be returned.bytes containing the new converted image.ImageConverter.convertImage(byte[], java.lang.String, java.util.List)protected static javax.media.jai.PlanarImage crop(javax.media.jai.PlanarImage inImg,
int x1,
int y1,
int x2,
int y2)
protected static javax.media.jai.PlanarImage size(javax.media.jai.PlanarImage inImg,
int width,
int height,
boolean maintainAspectRation)
inImg - the image to transformwidth - new width of the imageheight - new height of the imagemaintainAspectRation - if true, width and height are maximums: aspect ratio is maintainedprotected static javax.media.jai.PlanarImage negate(javax.media.jai.PlanarImage inImg)
inImg - the image to transformprotected static javax.media.jai.PlanarImage rotate(javax.media.jai.PlanarImage inImg,
int x,
int y,
int a)
inImg - the image to transformx - xposition of the rotationy - yposition of the rotationa - angle of the rotationprotected static javax.media.jai.PlanarImage border(javax.media.jai.PlanarImage inImg,
int xpadding,
int ypadding)
inImg - the image to transformxpadding - the horizontal paddingypadding - the vertical paddingprotected static javax.media.jai.PlanarImage flop(javax.media.jai.PlanarImage inImg)
inImg - the image to transformprotected static javax.media.jai.PlanarImage flip(javax.media.jai.PlanarImage inImg)
inImg - the image to transformprotected static javax.media.jai.PlanarImage loadImage(String filename)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}