}
public static ImageScaler createImageScaler(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws WGException, JavaScriptException, ModuleInstantiationException, IOException {
if (args.length != 1) {
throw new EvaluatorException("Method WGA.createImageScaler() needs either a file or an input stream as parameter");
}
Object arg = args[0];
if (arg instanceof Wrapper) {
arg = ((Wrapper) arg).unwrap();
}
if (arg instanceof File) {
return fetchInitialContext(cx).createimagescaler((File) arg);
}
else if (arg instanceof InputStream) {
return fetchInitialContext(cx).createimagescaler((InputStream) arg);
}
else {
throw new EvaluatorException("Method WGA.createImageScaler() needs either a file or an input stream as parameter");
}
}