Class RASCodec


  • public class RASCodec
    extends ImageCodec
    A codec to read and write Sun Raster (RAS) image files. The typical file extension for this format is .ras.

    Usage example

    This code snippet demonstrate how to read a RAS file.
     RASCodec codec = new RASCodec();
     codec.setFile("image.ras", CodecMode.LOAD);
     codec.process();
     PixelImage loadedImage = codec.getImage();
     

    Supported file types when reading

    Only uncompressed RAS files are read. Only 8 bit (gray and paletted) and 24 bit are supported when reading.

    Supported image types when writing

    Only Paletted8Image / uncompressed is supported when writing.

    Bounds

    The bounds concept of ImageCodec is supported so that you can load or save only part of an image.

    File format documentation

    This file format is documented as a man page 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.
    Author:
    Marco Schmidt