Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
net.sourceforge.jiu.ops.Operation
net.sourceforge.jiu.codecs.ImageCodec
net.sourceforge.jiu.codecs.RASCodec
public class RASCodec
extends ImageCodec
.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.
Field Summary | |
private static int | |
private static int | |
private static int | |
private int | |
private int | |
private int | |
private DataInput | |
private int | |
private int | |
private int | |
private int | |
private DataOutput | |
private int | |
private Palette | |
private int | |
private int |
Fields inherited from class net.sourceforge.jiu.codecs.ImageCodec | |
boundsAvail , boundsHeight , boundsWidth , boundsX1 , boundsX2 , boundsY1 , boundsY2 , comments , din , dout , dpiX , dpiY , image , imageIndex , in , mode , out , raf |
Fields inherited from class net.sourceforge.jiu.ops.Operation | |
abort , progressListeners |
Method Summary | |
String | |
String[] | |
boolean | |
boolean | |
private void |
|
void |
|
private void | |
private IntegerImage | |
private Palette | |
private void |
|
private void |
|
private void |
|
private void |
|
String |
|
Methods inherited from class net.sourceforge.jiu.ops.Operation | |
addProgressListener , addProgressListeners , getAbort , process , removeProgressListener , setAbort , setProgress , setProgress |
private static final int COMPRESSION_NONE
- Field Value:
- 1
private static final int RAS_HEADER_SIZE
- Field Value:
- 32
private static final int RAS_MAGIC
- Field Value:
- 1504078485
private int bytesPerRow
private int depth
private int height
private DataInput in
private int length
private int mapLength
private int mapType
private int numColors
private DataOutput out
private int paddingBytes
private int type
private int width
public boolean isLoadingSupported()
- Overrides:
- isLoadingSupported in interface ImageCodec
public boolean isSavingSupported()
- Overrides:
- isSavingSupported in interface ImageCodec
private void load() throws IOException, OperationFailedException
Loads an image from an RAS input stream. It is assumed that a stream was given to this codec usingsetInputStream(InputStream)
.
private void readHeader() throws InvalidFileStructureException, UnsupportedTypeException, WrongFileFormatException, WrongParameterException, IOException
private void saveHeader(PixelImage image) throws IOException, UnsupportedTypeException, WrongParameterException
public String suggestFileExtension(PixelImage image)
- Overrides:
- suggestFileExtension in interface ImageCodec