|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object utils.ImageTransform
public class ImageTransform
utils for transformation image
Constructor Summary | |
---|---|
ImageTransform()
|
Method Summary | |
---|---|
static java.lang.String |
cacheKey(java.lang.Long id,
int width,
int height)
create key for cache |
static byte[] |
cropImage(byte[] image,
java.lang.Integer width,
java.lang.Integer height,
java.lang.Boolean stretch,
java.lang.String format)
crop image |
static byte[] |
getImage(byte[] image,
java.lang.Integer width,
java.lang.Integer height,
java.lang.String format,
java.lang.Boolean stretch,
java.lang.Boolean crop)
transform image |
static byte[] |
joinImages(java.util.List<java.awt.Image> imageList,
java.lang.Integer width,
java.lang.Integer height,
java.lang.String format)
join images |
static byte[] |
thumb(java.lang.String url,
int width,
int height)
create transformation image |
static byte[] |
thumb(java.lang.String url,
int width,
int height,
java.lang.String format)
create transformation image |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageTransform()
Method Detail |
---|
public static java.lang.String cacheKey(java.lang.Long id, int width, int height)
id
- id of imagewidth
- width of caching imageheight
- height of caching image
public static byte[] thumb(java.lang.String url, int width, int height)
url
- image urlwidth
- output widthheight
- output height
public static byte[] thumb(java.lang.String url, int width, int height, java.lang.String format)
url
- image urlwidth
- output widthheight
- output heightformat
- image format, for example png
public static byte[] cropImage(byte[] image, java.lang.Integer width, java.lang.Integer height, java.lang.Boolean stretch, java.lang.String format)
image
- input image in byte arraywidth
- output widthheight
- output heightstretch
- true if image must be stretchedformat
- image format
public static byte[] getImage(byte[] image, java.lang.Integer width, java.lang.Integer height, java.lang.String format, java.lang.Boolean stretch, java.lang.Boolean crop)
image
- input image in byte arraywidth
- output widthheight
- output heightformat
- image formatstretch
- true if image must be stretchedcrop
- true if image must be crop
public static byte[] joinImages(java.util.List<java.awt.Image> imageList, java.lang.Integer width, java.lang.Integer height, java.lang.String format) throws java.io.IOException
imageList
- list of Image objectwidth
- output widthheight
- output heightformat
- image format
java.io.IOException
- write to output stream is not correct
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |