Package org.sunflow.image.readers
Class IGIBitmapReader
- java.lang.Object
-
- org.sunflow.image.readers.IGIBitmapReader
-
- All Implemented Interfaces:
BitmapReader
public class IGIBitmapReader extends java.lang.Object implements BitmapReader
Reads images in Indigo's native XYZ format. http://www2.indigorenderer.com/joomla/forum/viewtopic.php?p=11430
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.sunflow.image.BitmapReader
BitmapReader.BitmapFormatException
-
-
Constructor Summary
Constructors Constructor Description IGIBitmapReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Bitmap
load(java.lang.String filename, boolean isLinear)
Load the specified filename.private static float
read32f(java.io.InputStream stream)
private static int
read32i(java.io.InputStream stream)
-
-
-
Method Detail
-
load
public Bitmap load(java.lang.String filename, boolean isLinear) throws java.io.IOException, BitmapReader.BitmapFormatException
Description copied from interface:BitmapReader
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), aBitmapReader.BitmapFormatException
may be thrown. It is an error for this method to returnnull
.- Specified by:
load
in interfaceBitmapReader
- Parameters:
filename
- image filename to loadisLinear
- if this istrue
, 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
-
read32i
private static final int read32i(java.io.InputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
read32f
private static final float read32f(java.io.InputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
-