public class SmartImage extends Object
| Constructor and Description |
|---|
SmartImage() |
SmartImage(BufferedImage image) |
SmartImage(SmartImage image) |
| Modifier and Type | Method and Description |
|---|---|
SmartImage |
centeredSubImage(int w,
int h) |
void |
copyTo(OutputStream out) |
SmartImage |
create(int w,
int h) |
SmartImage |
crop(float ratio) |
SmartImage |
crop(int w,
int h) |
SmartImage |
cropBottom(int percentage) |
SmartImage |
cropRect() |
SmartImage |
drawImage(BufferedImage newImage) |
SmartImage |
drawImage(BufferedImage image2,
int x,
int y,
int w,
int h) |
SmartImage |
drawImage(String file) |
SmartImage |
drawImage(String file,
int x,
int y,
int w,
int h) |
void |
drawSubImage(String file,
int x,
int y,
int w,
int h) |
SmartImage |
drawText(int x,
int y,
int w,
int h,
String s) |
SmartImage |
drawText(String s,
int x,
int y,
int width,
int height,
float linespace,
Font font,
Color color) |
SmartImage |
expand(int w,
int h) |
SmartImage |
expand(int w,
int h,
int x,
int y) |
SmartImage |
fill(int r,
int g,
int b,
int a) |
int |
getHeight() |
BufferedImage |
getImage() |
int |
getJpegQuality() |
Rectangle2D |
getTextBound(String s,
Font font) |
int |
getWidth() |
boolean |
isValid() |
SmartImage |
letterbox(int w,
int h,
int r,
int g,
int b,
int a) |
SmartImage |
load() |
SmartImage |
rotate(float degr) |
SmartImage |
scale(float f) |
SmartImage |
scale(int w,
int h) |
SmartImage |
scaleHeight(int h) |
SmartImage |
scaleWidth(int w) |
SmartImage |
set(InputStream in) |
SmartImage |
setAlpha(BufferedImage alpha,
int x,
int y) |
SmartImage |
setAlpha(String alpha,
int x,
int y) |
void |
setJpegQuality(int jpegQuality) |
SmartImage |
subImage(int x,
int y,
int w,
int h) |
public SmartImage()
public SmartImage(SmartImage image)
public SmartImage(BufferedImage image)
public int getJpegQuality()
public void setJpegQuality(int jpegQuality)
public boolean isValid()
public BufferedImage getImage()
public SmartImage set(InputStream in) throws IOException
IOExceptionpublic SmartImage load() throws Exception
Exceptionpublic SmartImage create(int w, int h) throws IOException
IOExceptionpublic SmartImage fill(int r, int g, int b, int a) throws IOException
IOExceptionpublic SmartImage rotate(float degr)
public SmartImage letterbox(int w, int h, int r, int g, int b, int a) throws Exception
Exceptionpublic SmartImage scaleWidth(int w) throws Exception
Exceptionpublic SmartImage scaleHeight(int h) throws Exception
Exceptionpublic SmartImage scale(float f) throws Exception
Exceptionpublic SmartImage scale(int w, int h) throws Exception
Exceptionpublic SmartImage drawText(String s, int x, int y, int width, int height, float linespace, Font font, Color color) throws Exception
Exceptionpublic SmartImage drawImage(String file) throws Exception
Exceptionpublic SmartImage drawImage(String file, int x, int y, int w, int h) throws Exception
Exceptionpublic SmartImage drawImage(BufferedImage image2, int x, int y, int w, int h) throws Exception
Exceptionpublic void drawSubImage(String file, int x, int y, int w, int h) throws Exception
Exceptionpublic Rectangle2D getTextBound(String s, Font font)
public SmartImage cropRect() throws Exception
Exceptionpublic SmartImage crop(int w, int h)
public SmartImage crop(float ratio) throws Exception
Exceptionpublic SmartImage centeredSubImage(int w, int h) throws Exception
Exceptionpublic SmartImage subImage(int x, int y, int w, int h) throws Exception
Exceptionpublic SmartImage drawText(int x, int y, int w, int h, String s) throws Exception
Exceptionpublic SmartImage setAlpha(String alpha, int x, int y) throws Exception
Exceptionpublic SmartImage setAlpha(BufferedImage alpha, int x, int y)
public void copyTo(OutputStream out) throws Exception
Exceptionpublic int getWidth()
public int getHeight()
public SmartImage expand(int w, int h) throws IOException
IOExceptionpublic SmartImage expand(int w, int h, int x, int y) throws IOException
IOExceptionpublic SmartImage drawImage(BufferedImage newImage) throws IOException
IOExceptionpublic SmartImage cropBottom(int percentage)
Copyright © 2015. All rights reserved.