org.ajax4jsf.framework.util.image.imageio.gif.GIFImageWriterSpi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ajax4jsf Show documentation
Show all versions of ajax4jsf Show documentation
Ajax4jsf is an open source extension to the JavaServer Faces standard that adds AJAX capability to JSF applications without requiring the writing of any JavaScript.
The newest version!
/*
* Helma License Notice
*
* The contents of this file are subject to the Helma License
* Version 2.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://adele.helma.org/download/helma/license.txt
*
* Copyright 1998-2003 Helma Software. All Rights Reserved.
*
* $RCSfile: GIFImageWriterSpi.java,v $
* $Author: sergeysmirnov $
* $Revision: 1.1 $
* $Date: 2006/04/28 02:05:55 $
*/
/*
* The imageio integration is inspired by the package org.freehep.graphicsio.gif
*/
package org.ajax4jsf.framework.util.image.imageio.gif;
import java.io.IOException;
import java.util.Locale;
import javax.imageio.ImageTypeSpecifier;
import javax.imageio.ImageWriter;
import javax.imageio.spi.ImageWriterSpi;
public class GIFImageWriterSpi extends ImageWriterSpi {
public GIFImageWriterSpi() {
super(
"Helma Object Publisher, http://helma.org/",
"1.0",
new String[] {"gif", "GIF"},
new String[] {"gif", "GIF"},
new String[] {"image/gif", "image/x-gif"},
"helma.image.imageio.gif.GIFImageWriter",
STANDARD_OUTPUT_TYPE,
null,
false, null, null, null, null,
false, null, null, null, null
);
}
public String getDescription(Locale locale) {
return "Graphics Interchange Format";
}
public ImageWriter createWriterInstance(Object extension)
throws IOException {
return new GIFImageWriter(this);
}
public boolean canEncodeImage(ImageTypeSpecifier type) {
// FIXME handle # colors
return true;
}
}