com.clickntap.tool.types
Class SmartImage
java.lang.Object
com.clickntap.tool.types.SmartImage
public class SmartImage
- extends Object
|
Method Summary |
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SmartImage
public SmartImage()
SmartImage
public SmartImage(SmartImage image)
SmartImage
public SmartImage(BufferedImage image)
getJpegQuality
public int getJpegQuality()
setJpegQuality
public void setJpegQuality(int jpegQuality)
isValid
public boolean isValid()
getImage
public BufferedImage getImage()
set
public SmartImage set(InputStream in)
throws IOException
- Throws:
IOException
load
public SmartImage load()
throws Exception
- Throws:
Exception
create
public SmartImage create(int w,
int h)
throws IOException
- Throws:
IOException
fill
public SmartImage fill(int r,
int g,
int b,
int a)
throws IOException
- Throws:
IOException
rotate
public SmartImage rotate(float degr)
letterbox
public SmartImage letterbox(int w,
int h,
int r,
int g,
int b,
int a)
throws Exception
- Throws:
Exception
scaleWidth
public SmartImage scaleWidth(int w)
throws Exception
- Throws:
Exception
scaleHeight
public SmartImage scaleHeight(int h)
throws Exception
- Throws:
Exception
scale
public SmartImage scale(float f)
throws Exception
- Throws:
Exception
scale
public SmartImage scale(int w,
int h)
throws Exception
- Throws:
Exception
drawText
public SmartImage drawText(String s,
int x,
int y,
int width,
int height,
float linespace,
Font font,
Color color)
throws Exception
- Throws:
Exception
drawImage
public SmartImage drawImage(String file)
throws Exception
- Throws:
Exception
drawImage
public SmartImage drawImage(String file,
int x,
int y,
int w,
int h)
throws Exception
- Throws:
Exception
drawImage
public SmartImage drawImage(BufferedImage image2,
int x,
int y,
int w,
int h)
throws Exception
- Throws:
Exception
drawSubImage
public void drawSubImage(String file,
int x,
int y,
int w,
int h)
throws Exception
- Throws:
Exception
getTextBound
public Rectangle2D getTextBound(String s,
Font font)
cropRect
public SmartImage cropRect()
throws Exception
- Throws:
Exception
crop
public SmartImage crop(int w,
int h)
crop
public SmartImage crop(float ratio)
throws Exception
- Throws:
Exception
centeredSubImage
public SmartImage centeredSubImage(int w,
int h)
throws Exception
- Throws:
Exception
subImage
public SmartImage subImage(int x,
int y,
int w,
int h)
throws Exception
- Throws:
Exception
drawText
public SmartImage drawText(int x,
int y,
int w,
int h,
String s)
throws Exception
- Throws:
Exception
setAlpha
public SmartImage setAlpha(String alpha,
int x,
int y)
throws Exception
- Throws:
Exception
setAlpha
public SmartImage setAlpha(BufferedImage alpha,
int x,
int y)
copyTo
public void copyTo(OutputStream out)
throws Exception
- Throws:
Exception
getWidth
public int getWidth()
getHeight
public int getHeight()
expand
public SmartImage expand(int w,
int h)
throws IOException
- Throws:
IOException
expand
public SmartImage expand(int w,
int h,
int x,
int y)
throws IOException
- Throws:
IOException
drawImage
public SmartImage drawImage(BufferedImage newImage)
throws IOException
- Throws:
IOException
cropBottom
public SmartImage cropBottom(int percentage)
Copyright © 2014. All rights reserved.