outputFormat = (ImageMime) ImageMime.createFromFormat(values.get("format"));
List<MimeType> ml = layer.getMimeTypes();
Iterator<MimeType> iter = ml.iterator();
ImageMime firstMt = null;
if(iter.hasNext()){
firstMt = (ImageMime)iter.next();
}
boolean outputGif = outputFormat.getInternalName().equalsIgnoreCase("gif");