|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.runtime.type.util.StructSupport
railo.runtime.img.Image
public class Image
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface railo.runtime.type.Collection |
---|
Collection.Key |
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary | |
---|---|
static int |
BORDER_TYPE_CONSTANT
|
static int |
INTERPOLATION_BICUBIC
|
static int |
INTERPOLATION_BILINEAR
|
static int |
INTERPOLATION_NEAREST
|
static int |
INTERPOLATION_NONE
|
static int |
IP_BESSEL
|
static int |
IP_BLACKMAN
|
static int |
IP_HAMMING
|
static int |
IP_HANNING
|
static int |
IP_HERMITE
|
static int |
IP_HIGHESTPERFORMANCE
|
static int |
IP_HIGHESTQUALITY
|
static int |
IP_HIGHPERFORMANCE
|
static int |
IP_HIGHQUALITY
|
static int |
IP_LANCZOS
|
static int |
IP_MEDIUMPERFORMANCE
|
static int |
IP_MEDIUMQUALITY
|
static int |
IP_MITCHELL
|
static int |
IP_NONE
|
static int |
IP_QUADRATIC
|
static int |
IP_TRIANGLE
|
static int |
IPC_BICUBIC
|
static int |
IPC_BILINEAR
|
static int |
IPC_MAX
|
static int |
IPC_NEAREST
|
Fields inherited from interface railo.runtime.type.Struct |
---|
TYPE_LINKED, TYPE_REGULAR, TYPE_SYNC, TYPE_WEAKED |
Constructor Summary | |
---|---|
Image()
|
|
Image(BufferedImage image)
|
|
Image(byte[] binary)
|
|
Image(byte[] binary,
String format)
|
|
Image(int width,
int height,
int imageType,
Color canvasColor)
|
|
Image(Resource res)
|
|
Image(String b64str)
|
Method Summary | |
---|---|
void |
_rotate(float x,
float y,
float angle,
String interpolation)
|
void |
addBorder(int thickness,
Color color,
int borderType)
add a border to image |
void |
blur(int blurFactor)
|
Boolean |
castToBoolean(Boolean defaultValue)
cast the castable value to a boolean value |
boolean |
castToBooleanValue()
cast the castable value to a boolean value |
DateTime |
castToDateTime()
cast the castable value to a date time object |
DateTime |
castToDateTime(DateTime defaultValue)
cast the castable value to a date time object |
double |
castToDoubleValue()
cast the castable value to a double value |
double |
castToDoubleValue(double defaultValue)
cast the castable value to a double value |
String |
castToString()
cast the castable value to a string, other than the Method toString, this Method can throw a Exception |
String |
castToString(String defaultValue)
cast the castable value to a string, return the default value, when the method is not castable |
void |
clear()
clears the collection |
void |
clearRect(int x,
int y,
int width,
int height)
|
int |
compareTo(boolean b)
|
int |
compareTo(DateTime dt)
|
int |
compareTo(double d)
|
int |
compareTo(String str)
|
boolean |
containsKey(Collection.Key key)
contains this key |
boolean |
containsValue(Object value)
|
void |
convert(String format)
|
Image |
copy(float x,
float y,
float width,
float height)
|
Image |
copy(float x,
float y,
float width,
float height,
float dx,
float dy)
|
static Image |
createImage(PageContext pc,
Object obj,
boolean check4Var,
boolean clone,
boolean checkAccess)
|
void |
crop(float x,
float y,
float width,
float height)
|
void |
draw3DRect(int x,
int y,
int width,
int height,
boolean raised,
boolean filled)
|
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle,
boolean filled)
|
void |
drawCubicCurve(double ctrlx1,
double ctrly1,
double ctrlx2,
double ctrly2,
double x1,
double y1,
double x2,
double y2)
|
void |
drawImage(Image img,
int x,
int y)
|
void |
drawImage(Image img,
int x,
int y,
int width,
int height)
|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
|
void |
drawLines(int[] xcoords,
int[] ycoords,
boolean isPolygon,
boolean filled)
|
void |
drawOval(int x,
int y,
int width,
int height,
boolean filled)
|
void |
drawPoint(int x,
int y)
|
void |
drawQuadraticCurve(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
|
void |
drawRect(int x,
int y,
int width,
int height,
boolean filled)
|
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight,
boolean filled)
|
void |
drawString(String text,
int x,
int y,
Struct attr)
|
Collection |
duplicate(boolean deepCopy)
|
void |
flip(javax.media.jai.operator.TransposeType transpose)
|
Object |
get(Collection.Key key)
return a value from the collection |
Object |
get(Collection.Key key,
Object defaultValue)
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null |
String |
getBase64String(String format)
|
BufferedImage |
getBufferedImage()
|
ColorModel |
getColorModel()
|
String |
getFormat()
|
int |
getHeight()
|
byte[] |
getImageBytes(String format)
|
byte[] |
getImageBytes(String format,
boolean noMeta)
|
IIOMetadata |
getMetaData(Struct parent)
|
Resource |
getSource()
|
int |
getWidth()
|
void |
grayscale()
|
static boolean |
hasAlpha(Image image)
This method returns true if the specified image has transparent pixels |
BufferedImage |
image()
|
void |
image(BufferedImage image)
|
Struct |
info()
|
void |
invert()
|
static boolean |
isImage(Object obj)
|
Iterator |
keyIterator()
|
Collection.Key[] |
keys()
|
String[] |
keysAsString()
|
void |
overlay(Image topImage)
|
void |
paste(Image topImage,
int x,
int y)
|
Object |
remove(Collection.Key key)
removes value from collection and return it when it exists, otherwise throws a exception |
Object |
removeEL(Collection.Key key)
removes value from collection and return it when it exists, otherwise returns null |
void |
resize(int width,
int height,
int interpolation,
double blurFactor)
|
void |
resize(int scale,
String interpolation,
double blurFactor)
|
void |
resize(String strWidth,
String strHeight,
String interpolation,
double blurFactor)
|
void |
resizeImage(int width,
int height,
int interpolation)
|
void |
resizeImage2(int width,
int height)
|
void |
rgb()
|
void |
rotate(float x,
float y,
float angle,
int interpolation)
|
void |
rotateAxis(double angle)
|
void |
rotateAxis(double angle,
double x,
double y)
|
void |
scaleToFit(String fitWidth,
String fitHeight,
String interpolation,
double blurFactor)
|
Object |
set(Collection.Key key,
Object value)
sets a value to the collection |
void |
setAlpha(float alpha)
|
void |
setAntiAliasing(boolean antiAlias)
|
void |
setBackground(Color color)
|
void |
setColor(Color color)
|
void |
setDrawingStroke(float width,
int endcaps,
int linejoins,
float miterlimit,
float[] dash,
float dash_phase)
|
void |
setDrawingStroke(Stroke stroke)
|
void |
setDrawingStroke(Struct attr)
|
Object |
setEL(Collection.Key key,
Object value)
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null |
void |
setTranparency(float percent)
|
void |
setXorMode(Color color)
|
void |
sharpen(float gain)
|
void |
shear(float shear,
javax.media.jai.operator.ShearDir direction,
Object interpolation)
|
void |
shearAxis(double shx,
double shy)
|
int |
size()
|
void |
threeBBger()
|
static BufferedImage |
toBufferedImage(Image image)
|
DumpData |
toDumpData(PageContext pageContext,
int maxlevel,
DumpProperties dp)
method to print out information to a object as HTML |
static Image |
toImage(Object obj)
|
static int |
toInterpolation(String strInterpolation)
|
void |
translate(int xtrans,
int ytrans,
Object interpolation)
|
void |
translateAxis(int x,
int y)
|
Collection |
values()
|
String |
writeBase64(Resource destination,
String format,
boolean inHTMLFormat)
|
void |
writeOut(OutputStream os,
String format,
float quality,
boolean closeStream)
|
void |
writeOut(Resource destination,
boolean overwrite,
float quality)
|
void |
writeOut(Resource destination,
String format,
boolean overwrite,
float quality)
|
static void |
writeOutGif(BufferedImage src,
OutputStream os)
|
Methods inherited from class railo.runtime.type.util.StructSupport |
---|
clone, containsKey, containsKey, entrySet, equals, get, get, get, invalidKey, isEmpty, iterator, keySet, put, putAll, remove, set, setEL, sizeOf, toString, valueIterator |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface railo.runtime.type.Collection |
---|
clone, containsKey, get, get, set, setEL |
Methods inherited from interface railo.runtime.type.Iteratorable |
---|
iterator, valueIterator |
Methods inherited from interface java.util.Map |
---|
containsKey, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove |
Field Detail |
---|
public static final int BORDER_TYPE_CONSTANT
public static final int INTERPOLATION_NONE
public static final int INTERPOLATION_NEAREST
public static final int INTERPOLATION_BILINEAR
public static final int INTERPOLATION_BICUBIC
public static final int IP_NONE
public static final int IPC_NEAREST
public static final int IPC_BILINEAR
public static final int IPC_BICUBIC
public static final int IPC_MAX
public static final int IP_HIGHESTQUALITY
public static final int IP_HIGHQUALITY
public static final int IP_MEDIUMQUALITY
public static final int IP_HIGHESTPERFORMANCE
public static final int IP_HIGHPERFORMANCE
public static final int IP_MEDIUMPERFORMANCE
public static final int IP_BESSEL
public static final int IP_BLACKMAN
public static final int IP_HAMMING
public static final int IP_HANNING
public static final int IP_HERMITE
public static final int IP_LANCZOS
public static final int IP_MITCHELL
public static final int IP_QUADRATIC
public static final int IP_TRIANGLE
Constructor Detail |
---|
public Image(byte[] binary) throws IOException
IOException
public Image(byte[] binary, String format) throws IOException
IOException
public Image(Resource res) throws IOException
IOException
public Image(BufferedImage image)
public Image(String b64str) throws IOException, ExpressionException
IOException
ExpressionException
public Image(int width, int height, int imageType, Color canvasColor) throws ExpressionException
ExpressionException
public Image()
Method Detail |
---|
public void addBorder(int thickness, Color color, int borderType) throws ExpressionException
thickness
- color
- borderType
-
ExpressionException
public void blur(int blurFactor) throws ExpressionException
ExpressionException
public void clearRect(int x, int y, int width, int height) throws ExpressionException
ExpressionException
public Struct info() throws ExpressionException
ExpressionException
public IIOMetadata getMetaData(Struct parent)
public void sharpen(float gain) throws ExpressionException
ExpressionException
public void setTranparency(float percent) throws ExpressionException
ExpressionException
public void invert() throws ExpressionException
ExpressionException
public Image copy(float x, float y, float width, float height) throws ExpressionException
ExpressionException
public Image copy(float x, float y, float width, float height, float dx, float dy) throws ExpressionException
ExpressionException
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle, boolean filled) throws ExpressionException
ExpressionException
public void draw3DRect(int x, int y, int width, int height, boolean raised, boolean filled) throws ExpressionException
ExpressionException
public void drawCubicCurve(double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x1, double y1, double x2, double y2) throws ExpressionException
ExpressionException
public void drawPoint(int x, int y) throws ExpressionException
ExpressionException
public void drawQuadraticCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2) throws ExpressionException
ExpressionException
public void drawRect(int x, int y, int width, int height, boolean filled) throws ExpressionException
ExpressionException
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight, boolean filled) throws ExpressionException
ExpressionException
public void drawLine(int x1, int y1, int x2, int y2) throws ExpressionException
ExpressionException
public void drawImage(Image img, int x, int y) throws ExpressionException
ExpressionException
public void drawImage(Image img, int x, int y, int width, int height) throws ExpressionException
ExpressionException
public void drawLines(int[] xcoords, int[] ycoords, boolean isPolygon, boolean filled) throws ExpressionException
ExpressionException
public void drawOval(int x, int y, int width, int height, boolean filled) throws ExpressionException
ExpressionException
public void drawString(String text, int x, int y, Struct attr) throws PageException
PageException
public void setDrawingStroke(Struct attr) throws PageException
PageException
public void setDrawingStroke(float width, int endcaps, int linejoins, float miterlimit, float[] dash, float dash_phase) throws ExpressionException
ExpressionException
public void setDrawingStroke(Stroke stroke) throws ExpressionException
ExpressionException
public void flip(javax.media.jai.operator.TransposeType transpose) throws ExpressionException
ExpressionException
public void grayscale() throws ExpressionException
ExpressionException
public void rgb() throws ExpressionException
ExpressionException
public void threeBBger() throws ExpressionException
ExpressionException
public void overlay(Image topImage) throws ExpressionException
ExpressionException
public void paste(Image topImage, int x, int y) throws ExpressionException
ExpressionException
public void setXorMode(Color color) throws ExpressionException
ExpressionException
public void translate(int xtrans, int ytrans, Object interpolation) throws ExpressionException
ExpressionException
public void translateAxis(int x, int y) throws ExpressionException
ExpressionException
public void rotateAxis(double angle) throws ExpressionException
ExpressionException
public void rotateAxis(double angle, double x, double y) throws ExpressionException
ExpressionException
public void shearAxis(double shx, double shy) throws ExpressionException
ExpressionException
public void shear(float shear, javax.media.jai.operator.ShearDir direction, Object interpolation) throws ExpressionException
ExpressionException
public BufferedImage getBufferedImage() throws ExpressionException
ExpressionException
public BufferedImage image() throws ExpressionException
ExpressionException
public void image(BufferedImage image)
public String writeBase64(Resource destination, String format, boolean inHTMLFormat) throws PageException, IOException
PageException
IOException
public String getBase64String(String format) throws PageException
PageException
public void writeOut(Resource destination, boolean overwrite, float quality) throws IOException, ExpressionException
IOException
ExpressionException
public void writeOut(Resource destination, String format, boolean overwrite, float quality) throws IOException, ExpressionException
IOException
ExpressionException
public static void writeOutGif(BufferedImage src, OutputStream os) throws IOException
IOException
public void writeOut(OutputStream os, String format, float quality, boolean closeStream) throws IOException, ExpressionException
IOException
ExpressionException
public void convert(String format)
public void scaleToFit(String fitWidth, String fitHeight, String interpolation, double blurFactor) throws PageException
PageException
public void resize(int scale, String interpolation, double blurFactor) throws PageException
PageException
public void resize(String strWidth, String strHeight, String interpolation, double blurFactor) throws PageException
PageException
public void resizeImage2(int width, int height) throws ExpressionException
ExpressionException
public void resizeImage(int width, int height, int interpolation) throws ExpressionException
ExpressionException
public void resize(int width, int height, int interpolation, double blurFactor) throws ExpressionException
ExpressionException
public void rotate(float x, float y, float angle, int interpolation) throws ExpressionException
ExpressionException
public void _rotate(float x, float y, float angle, String interpolation) throws ExpressionException
ExpressionException
public static Image toImage(Object obj) throws PageException
PageException
public static boolean isImage(Object obj)
public static Image createImage(PageContext pc, Object obj, boolean check4Var, boolean clone, boolean checkAccess) throws PageException
PageException
public Collection duplicate(boolean deepCopy)
duplicate
in interface Collection
Collection.duplicate(boolean)
public ColorModel getColorModel() throws ExpressionException
ExpressionException
public void crop(float x, float y, float width, float height) throws ExpressionException
ExpressionException
public int getWidth() throws ExpressionException
ExpressionException
public int getHeight() throws ExpressionException
ExpressionException
public String getFormat()
public byte[] getImageBytes(String format) throws PageException
PageException
public byte[] getImageBytes(String format, boolean noMeta) throws PageException
PageException
public void setColor(Color color) throws ExpressionException
ExpressionException
public void setAlpha(float alpha) throws ExpressionException
ExpressionException
public void setBackground(Color color) throws ExpressionException
ExpressionException
public void setAntiAliasing(boolean antiAlias) throws ExpressionException
ExpressionException
public void clear()
Collection
clear
in interface Map
clear
in interface Collection
Collection.clear()
public boolean containsKey(Collection.Key key)
Collection
containsKey
in interface Collection
Collection.containsKey(railo.runtime.type.Collection.Key)
public Object get(Collection.Key key) throws PageException
Collection
get
in interface Collection
key
- key of the value to get must be lower case
PageException
Collection.get(railo.runtime.type.Collection.Key)
public Object get(Collection.Key key, Object defaultValue)
Collection
get
in interface Collection
key
- key of the value to get
Collection.get(railo.runtime.type.Collection.Key, java.lang.Object)
public Collection.Key[] keys()
keys
in interface Collection
Collection.keys()
public String[] keysAsString()
keysAsString
in interface Collection
Collection.keysAsString()
public Object remove(Collection.Key key) throws PageException
Collection
remove
in interface Collection
key
- key of the collection
PageException
Collection.remove(railo.runtime.type.Collection.Key)
public Object removeEL(Collection.Key key)
Collection
removeEL
in interface Collection
key
- key of the collection
Collection.removeEL(railo.runtime.type.Collection.Key)
public Object set(Collection.Key key, Object value) throws PageException
Collection
set
in interface Collection
key
- key of the new valuevalue
- value to set
PageException
Collection.set(railo.runtime.type.Collection.Key, java.lang.Object)
public Object setEL(Collection.Key key, Object value)
Collection
setEL
in interface Collection
key
- key of the value to getvalue
- value to set
Collection.setEL(railo.runtime.type.Collection.Key, java.lang.Object)
public int size()
size
in interface Map
size
in interface Collection
Collection.size()
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
Dumpable
toDumpData
in interface Dumpable
toDumpData
in class StructSupport
railo.runtime.dump.Dumpable#toDumpData(railo.runtime.PageContext, int)
public Iterator keyIterator()
keyIterator
in interface Iteratorable
Iteratorable.keyIterator()
public boolean castToBooleanValue() throws PageException
Castable
castToBooleanValue
in interface Castable
castToBooleanValue
in class StructSupport
PageException
Castable.castToBooleanValue()
public Boolean castToBoolean(Boolean defaultValue)
Castable
castToBoolean
in interface Castable
castToBoolean
in class StructSupport
StructSupport.castToBoolean(java.lang.Boolean)
public DateTime castToDateTime() throws PageException
Castable
castToDateTime
in interface Castable
castToDateTime
in class StructSupport
PageException
Castable.castToDateTime()
public DateTime castToDateTime(DateTime defaultValue)
Castable
castToDateTime
in interface Castable
castToDateTime
in class StructSupport
defaultValue
- returned when it is not possible to cast to a dateTime object
Castable.castToDateTime(railo.runtime.type.dt.DateTime)
public double castToDoubleValue() throws PageException
Castable
castToDoubleValue
in interface Castable
castToDoubleValue
in class StructSupport
PageException
Castable.castToDoubleValue()
public double castToDoubleValue(double defaultValue)
Castable
castToDoubleValue
in interface Castable
castToDoubleValue
in class StructSupport
Castable.castToDoubleValue(double)
public String castToString() throws PageException
Castable
castToString
in interface Castable
castToString
in class StructSupport
PageException
Castable.castToString()
public String castToString(String defaultValue)
Castable
castToString
in interface Castable
castToString
in class StructSupport
StructSupport.castToString(java.lang.String)
public int compareTo(String str) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
Castable.compareTo(java.lang.String)
public int compareTo(boolean b) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
Castable.compareTo(boolean)
public int compareTo(double d) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
Castable.compareTo(double)
public int compareTo(DateTime dt) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
Castable.compareTo(railo.runtime.type.dt.DateTime)
public static int toInterpolation(String strInterpolation) throws ExpressionException
ExpressionException
public Resource getSource()
public boolean containsValue(Object value)
containsValue
in interface Map
containsValue
in class StructSupport
Map.containsValue(java.lang.Object)
public Collection values()
values
in interface Map
values
in class StructSupport
Map.values()
public static boolean hasAlpha(Image image)
image
-
public static BufferedImage toBufferedImage(Image image)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |