// Record time take to load the input into memory:
sph.loaded();
// Pick up the output format:
ImageFormat format = null;
for( ImageFormat f : ImageFormat.getAllFormats() ) {
if (FormatRegistryFactory.getFormatRegistry().createExtensionUri(
f.extension).equals(outputFormat))
format = f;
}
if( format == null ) {
return this.returnWithErrorMessage("Unsupported output format: "+outputFormat,null);
} else {
log.info("Outputing image to format: "+format.toString());
}
Map params = new HashMap();
if(parameters!=null) {