|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cruxframework.crux.core.client.image.ImageProcessor
public class ImageProcessor
An Image processor
| Nested Class Summary | |
|---|---|
static interface |
ImageProcessor.ImageCreateAndLoadHandler
|
static interface |
ImageProcessor.ImageLoadHandler
|
| Constructor Summary | |
|---|---|
protected |
ImageProcessor()
Constructor |
| Method Summary | |
|---|---|
Blob |
asGif()
Export content image as a GIF file. |
Blob |
asJpeg(double quality)
Export content image as a JPEG file. |
Blob |
asPng()
Export content image as a PNG file. |
static ImageProcessor |
createIfSupported()
If the current browser supports, create a new ImageProcessor |
static void |
createIfSupportedAndLoadImage(Blob image,
ImageProcessor.ImageCreateAndLoadHandler handler)
Create ImageProcessor instance and automatically loads the image. |
static void |
createIfSupportedAndLoadImage(String url,
ImageProcessor.ImageCreateAndLoadHandler handler)
Create ImageProcessor instance and automatically loads the image. |
void |
ensureMaxSize(int maxHeight,
int maxWidth,
boolean keepProportions)
Ensure a max size for the image |
static boolean |
isSupported()
Check if browser supports this feature |
void |
loadImage(Blob image,
ImageProcessor.ImageLoadHandler handler)
Loads an image to the processor. |
void |
loadImage(String url,
ImageProcessor.ImageLoadHandler handler)
Loads an image to the processor. |
void |
resize(int width,
int height)
Resize the internal image |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ImageProcessor()
| Method Detail |
|---|
public static void createIfSupportedAndLoadImage(Blob image,
ImageProcessor.ImageCreateAndLoadHandler handler)
file - Image Filehandler - Called whem image is completely loaded
public static void createIfSupportedAndLoadImage(String url,
ImageProcessor.ImageCreateAndLoadHandler handler)
url - Image URLhandler - Called whem image is completely loaded
public void loadImage(String url,
ImageProcessor.ImageLoadHandler handler)
url - Image URLhandler - Called whem image is completely loaded
public void loadImage(Blob image,
ImageProcessor.ImageLoadHandler handler)
file - Image Filehandler - Called whem image is completely loaded
public void ensureMaxSize(int maxHeight,
int maxWidth,
boolean keepProportions)
maxHeight - maxWidth - keepProportions -
public void resize(int width,
int height)
width - height - public Blob asJpeg(double quality)
quality - JPEG quality. It ranges from 0.0 to 1.0
public Blob asPng()
public Blob asGif()
public static boolean isSupported()
public static ImageProcessor createIfSupported()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||