| 1 |
// Copyright 2003-2006, FreeHEP |
| 2 |
package org.freehep.graphicsio.ppm; |
| 3 |
|
| 4 |
import java.io.IOException; |
| 5 |
import java.util.Locale; |
| 6 |
|
| 7 |
import javax.imageio.ImageTypeSpecifier; |
| 8 |
import javax.imageio.ImageWriter; |
| 9 |
import javax.imageio.spi.ImageWriterSpi; |
| 10 |
|
| 11 |
/** |
| 12 |
* @author Mark Donszelmann |
| 13 |
* @version $Id: freehep-graphicsio/src/main/java/org/freehep/graphicsio/ppm/PPMImageWriterSpi.java 381498a7681c 2006/12/04 15:41:17 duns $ |
| 14 |
*/ |
| 15 |
public class PPMImageWriterSpi extends ImageWriterSpi { |
| 16 |
|
| 17 |
public PPMImageWriterSpi() { |
| 18 |
super("FreeHEP Java Libraries, http://java.freehep.org/", "1.0", |
| 19 |
new String[] { "ppm" }, new String[] { "ppm" }, |
| 20 |
new String[] { "image/x-portable-pixmap", |
| 21 |
"image/x-portable-pixmap" }, |
| 22 |
"org.freehep.graphicsio.ppm.PPMImageWriter", |
| 23 |
STANDARD_OUTPUT_TYPE, null, false, null, null, null, null, |
| 24 |
false, null, null, null, null); |
| 25 |
} |
| 26 |
|
| 27 |
public String getDescription(Locale locale) { |
| 28 |
return "FreeHEP UNIX Portable PixMap Format"; |
| 29 |
} |
| 30 |
|
| 31 |
public ImageWriter createWriterInstance(Object extension) |
| 32 |
throws IOException { |
| 33 |
return new PPMImageWriter(this); |
| 34 |
} |
| 35 |
|
| 36 |
public boolean canEncodeImage(ImageTypeSpecifier type) { |
| 37 |
// FIXME |
| 38 |
return true; |
| 39 |
} |
| 40 |
} |