|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplay.libs.Images
public class Images
Images utils
| Nested Class Summary | |
|---|---|
static class |
Images.Captcha
A captcha image. |
| Constructor Summary | |
|---|---|
Images()
|
|
| Method Summary | |
|---|---|
static Images.Captcha |
captcha()
Create a 150x150 captcha image |
static Images.Captcha |
captcha(int width,
int height)
Create a captche image |
static void |
crop(File originalImage,
File to,
Integer x1,
Integer y1,
Integer x2,
Integer y2)
Crop an image |
static void |
resize(File originalImage,
File to,
Integer w,
Integer h)
Resize an image |
static String |
toBase64(File image)
Encode an image to base64 using a data: URI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Images()
| Method Detail |
|---|
public static void resize(File originalImage,
File to,
Integer w,
Integer h)
originalImage - The image fileto - The destination filew - The new width (or -1 to proportionally resize)h - The new height (or -1 to proportionally resize)
public static void crop(File originalImage,
File to,
Integer x1,
Integer y1,
Integer x2,
Integer y2)
originalImage - The image fileto - The destination filex1 - The new x originy1 - The new y originx2 - The new x endy2 - The new y end
public static String toBase64(File image)
throws IOException
image - The image file
IOException
public static Images.Captcha captcha(int width,
int height)
public static Images.Captcha captcha()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||