made ImageIOGenerator the default ImageGenerator, JimiGenerator the fallback scenario
This commit is contained in:
parent
67d7e915ee
commit
25fd8cb805
1 changed files with 10 additions and 7 deletions
|
@ -56,15 +56,18 @@ public abstract class ImageGenerator {
|
|||
if (className == null) {
|
||||
// if no class is defined, try the default ones:
|
||||
try {
|
||||
Class.forName("com.sun.jimi.core.Jimi");
|
||||
// if we're still here, JimiWrapper can be used
|
||||
className = "helma.image.jimi.JimiGenerator";
|
||||
} catch (ClassNotFoundException e1) {
|
||||
try {
|
||||
// start with ImageIO
|
||||
Class.forName("javax.imageio.ImageIO");
|
||||
// if we're still here, ImageIOWrapper can be used
|
||||
className = "helma.image.imageio.ImageIOGenerator";
|
||||
} catch (ClassNotFoundException e1) {
|
||||
try {
|
||||
// use Jimi as a fallback scenaio
|
||||
Class.forName("com.sun.jimi.core.Jimi");
|
||||
// if we're still here, JimiWrapper can be used
|
||||
className = "helma.image.jimi.JimiGenerator";
|
||||
} catch (ClassNotFoundException e2) {
|
||||
throw new RuntimeException("JimiGenerator canot be used. Please make sure you placed jimi.jar in helma/lib/ext");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -175,7 +178,7 @@ public abstract class ImageGenerator {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param url the URL the filename of the image to create
|
||||
* @param url the URL of the image to create
|
||||
*
|
||||
* @return the newly created image
|
||||
* @throws IOException
|
||||
|
|
Loading…
Add table
Reference in a new issue