|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmagoffin.matt.ma2.image.awt.BaseAwtMediaEffect
magoffin.matt.ma2.image.awt.ScaleEffect
public class ScaleEffect
Effect that scales an image to the size specified on the request.
Note this effect assumes a rotate effect has not been applied before this effect is applied.
| Field Summary | |
|---|---|
static java.awt.RenderingHints |
DEFAULT_RENDERING_HINTS
The default RenderingHints applied to the scale operation. |
static java.lang.String |
SCALE_KEY
The key for this effect. |
| Fields inherited from class magoffin.matt.ma2.image.awt.BaseAwtMediaEffect |
|---|
log |
| Fields inherited from interface magoffin.matt.ma2.image.awt.AwtMediaEffect |
|---|
INPUT_BUFFERED_IMAGE_KEY |
| Fields inherited from interface magoffin.matt.ma2.MediaEffect |
|---|
KEY_ROTATE, KEY_SCALE, KEY_WATERMARK, MEDIA_REQUEST_PARAM_ROTATE_DEGREES, MEDIA_REQUEST_PARAM_WATERMARK_RESOURCE |
| Constructor Summary | |
|---|---|
ScaleEffect()
|
|
| Method Summary | |
|---|---|
java.awt.image.BufferedImage |
applyEffect(MediaItem item,
MediaRequest request,
java.awt.image.BufferedImage source)
Apply an effect on a BufferedImage and return the result
as a new BufferedImage. |
java.lang.String |
getKey()
Get the key for this effect. |
java.awt.RenderingHints |
getRenderingHints()
|
void |
setRenderingHints(java.awt.RenderingHints renderingHints)
|
| Methods inherited from class magoffin.matt.ma2.image.awt.BaseAwtMediaEffect |
|---|
apply, getMediaBiz, setMediaBiz |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.awt.RenderingHints DEFAULT_RENDERING_HINTS
RenderingHints applied to the scale operation.
The default hins contain:
RenderingHints.KEY_INTERPOLATIONRenderingHints.VALUE_INTERPOLATION_BICUBIC
public static final java.lang.String SCALE_KEY
| Constructor Detail |
|---|
public ScaleEffect()
| Method Detail |
|---|
public java.awt.image.BufferedImage applyEffect(MediaItem item,
MediaRequest request,
java.awt.image.BufferedImage source)
AwtMediaEffectBufferedImage and return the result
as a new BufferedImage.
If no change is made to the source BufferedImage then
source can be returned from this method.
item - the MediaItem the effect is being applied torequest - the requestsource - the source BufferedImage
BufferedImagepublic java.lang.String getKey()
MediaEffectKeys uniquely describe the implementation and
function of the effect. The implementation key should come first,
and the function key at the end. Some standard function key values are
defined in this API: MediaEffect.KEY_SCALE for re-sizing and MediaEffect.KEY_ROTATE
for rotating.
For example, a key might look like image.awt.rotate for
an image rotation effect based on a Java AWT implementation.
public java.awt.RenderingHints getRenderingHints()
public void setRenderingHints(java.awt.RenderingHints renderingHints)
renderingHints - The renderingHints to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||