opengl.common
Class ImageFileReader
java.lang.Object
opengl.common.ImageFileReader
public class ImageFileReader
- extends java.lang.Object
Method Summary |
static java.io.BufferedReader |
getResourceAsReader(java.lang.String filename)
|
static java.io.InputStream |
getResourceAsStream(java.lang.String filename)
|
static java.nio.ByteBuffer |
readData(java.awt.image.BufferedImage image,
boolean alphaChannel)
|
static java.nio.FloatBuffer |
readGrayscaleData(java.awt.image.BufferedImage img,
float maxVal)
|
static java.awt.image.BufferedImage |
readImage(java.io.File file)
|
static java.awt.image.BufferedImage |
readImage(java.lang.String filename)
|
static java.nio.FloatBuffer |
readImgData(java.awt.image.BufferedImage img,
ImageTexture imgTex,
Vec2 relSize)
|
static java.nio.FloatBuffer |
readRGBData(java.awt.image.BufferedImage img,
float maxVal)
|
static java.nio.ByteBuffer |
readTexture(java.io.File file)
|
static java.nio.ByteBuffer |
readTexture(java.lang.String filename)
|
static java.nio.ByteBuffer |
readTexture(java.lang.String filename,
boolean alphaChannel)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageFileReader
public ImageFileReader()
readTexture
public static java.nio.ByteBuffer readTexture(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
readTexture
public static java.nio.ByteBuffer readTexture(java.lang.String filename)
throws java.io.IOException
- Throws:
java.io.IOException
readTexture
public static java.nio.ByteBuffer readTexture(java.lang.String filename,
boolean alphaChannel)
throws java.io.IOException
- Throws:
java.io.IOException
readImage
public static java.awt.image.BufferedImage readImage(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
readImage
public static java.awt.image.BufferedImage readImage(java.lang.String filename)
throws java.io.IOException
- Throws:
java.io.IOException
getResourceAsReader
public static java.io.BufferedReader getResourceAsReader(java.lang.String filename)
throws java.io.IOException
- Throws:
java.io.IOException
getResourceAsStream
public static java.io.InputStream getResourceAsStream(java.lang.String filename)
throws java.io.IOException
- Throws:
java.io.IOException
readData
public static java.nio.ByteBuffer readData(java.awt.image.BufferedImage image,
boolean alphaChannel)
readImgData
public static java.nio.FloatBuffer readImgData(java.awt.image.BufferedImage img,
ImageTexture imgTex,
Vec2 relSize)
readGrayscaleData
public static java.nio.FloatBuffer readGrayscaleData(java.awt.image.BufferedImage img,
float maxVal)
readRGBData
public static java.nio.FloatBuffer readRGBData(java.awt.image.BufferedImage img,
float maxVal)