|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.ops.Operation
net.sourceforge.jiu.codecs.ImageCodec
net.sourceforge.jiu.codecs.RASCodec
A codec to read and write Sun Raster (RAS) image files.
The typical file extension for this format is .ras
.
RASCodec codec = new RASCodec(); codec.setFile("image.ras", CodecMode.LOAD); codec.process(); PixelImage loadedImage = codec.getImage();
Paletted8Image
/ uncompressed is supported when writing.
rasterfile(5)
on Sun Unix systems.
That documentation can also be found online, e.g. at
http://www.doc.ic.ac.uk/~mac/manuals/sunos-manual-pages/sunos4/usr/man/man5/rasterfile.5.html.
A web search for rasterfile(5)
brings up other places as well.
Constructor Summary | |
RASCodec()
|
Method Summary | |
String |
getFormatName()
Returns the name of the file format supported by this codec. |
String[] |
getMimeTypes()
Return the MIME (Multipurpose Internet Mail Extensions) type strings for this format, or null
if none are available. |
boolean |
isLoadingSupported()
Returns if this codec is able to load images in the file format supported by this codec. |
boolean |
isSavingSupported()
Returns if this codec is able to save images in the file format supported by this codec. |
void |
process()
This method does the actual work of the operation. |
String |
suggestFileExtension(PixelImage image)
Attempts to suggest a filename extension. |
Methods inherited from class net.sourceforge.jiu.codecs.ImageCodec |
appendComment, checkBounds, checkImageResolution, close, getBoundsHeight, getBoundsWidth, getBoundsX1, getBoundsX2, getBoundsY1, getBoundsY2, getComment, getDataInput, getDataOutput, getDpiX, getDpiY, getFileExtensions, getImage, getImageIndex, getInputAsDataInput, getInputStream, getMode, getNumComments, getOutputAsDataOutput, getOutputStream, getRandomAccessFile, hasBounds, initModeFromIOObjects, isRowRequired, isTileRequired, removeAllComments, removeBounds, setBounds, setBoundsIfNecessary, setDataInput, setDataOutput, setDpi, setFile, setFile, setImage, setImageIndex, setInputStream, setOutputStream, setRandomAccessFile |
Methods inherited from class net.sourceforge.jiu.ops.Operation |
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RASCodec()
Method Detail |
public String getFormatName()
ImageCodec
ImageCodec
must override this method.
When overriding, leave out any words in a particular language so
that this format name can be understood by everyone.
Usually it is enough to return the format creator plus a typical
abbreviation, e.g. Microsoft BMP
or Portable Anymap (PNM)
.
getFormatName
in class ImageCodec
public String[] getMimeTypes()
ImageCodec
null
if none are available.
getMimeTypes
in class ImageCodec
public boolean isLoadingSupported()
ImageCodec
true
is returned this does not necessarily mean that all files in this
format can be read, but at least some.
isLoadingSupported
in class ImageCodec
public boolean isSavingSupported()
ImageCodec
true
is returned this does not necessarily mean that all types files in this
format can be written, but at least some.
isSavingSupported
in class ImageCodec
public void process() throws OperationFailedException
Operation
process
in class Operation
OperationFailedException
public String suggestFileExtension(PixelImage image)
ImageCodec
PNMCodec
).
This default implementation always returns null
.
suggestFileExtension
in class ImageCodec
image
- the image that is to be written to a file
null
if no file extension can be recommended
|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |