org.sunflow.image

## Interface BitmapReader

All Known Implementing Classes:
  BMPBitmapReader, HDRBitmapReader, IGIBitmapReader, JPGBitmapReader, PNGBitmapReader, TGABitmapReader

    public interface BitmapReader

This is a very simple interface, designed to handle loading of bitmap data.

### Nested Class Summary

Nested Classes
`static class` `BitmapReader.BitmapFormatException` This exception can be used internally by bitmap readers to signal they have encountered a valid file but which contains invalid content.

### Method Summary

Methods
`Bitmap` `load(java.lang.String filename, boolean isLinear)` Load the specified filename.

### Method Detail

#### load

    Bitmap load(java.lang.String filename,
              boolean isLinear)
                throws java.io.IOException,
                       BitmapReader.BitmapFormatException

Load the specified filename. This method should throw exception if it encounters any errors. If the file is valid but its contents are not (invalid header for example), a `BitmapReader.BitmapFormatException` may be thrown. It is an error for this method to return `null`.

Parameters:
  `filename` - image filename to load
  `isLinear` - if this is `true`, the bitmap is assumed to be already in linear space. This can be usefull when reading greyscale images for bump mapping for example. HDR formats can ignore this flag since they usually always store data in linear form.
Returns:
  a new `Bitmap` object
Throws:
  `java.io.IOException`
  `BitmapReader.BitmapFormatException`