|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sdljava.image.SDLImage
public class SDLImage
SDL_image is an image loading library that is used with the SDL library, and almost as portable. It allows a programmer to use multiple image formats without having to code all the loading and conversion algorithms themselves.
Constructor Summary | |
---|---|
SDLImage()
|
Method Summary | |
---|---|
static SDLSurface |
load(java.nio.Buffer buf)
Load file for use as an image in a new surface. |
static SDLSurface |
load(byte[] data)
Load file for use as an image in a new surface. |
static SDLSurface |
load(java.io.InputStream in)
Load file for use as an image in a new surface. |
static SDLSurface |
load(java.lang.String file)
Load file for use as an image in a new surface. |
static SDLSurface |
load(java.net.URL url)
Load file for use as an image in a new surface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SDLImage()
Method Detail |
---|
public static SDLSurface load(java.lang.String file) throws SDLException
file
- Path to image file
SDLSurface
SDLException
- if an error occurspublic static SDLSurface load(java.nio.Buffer buf) throws SDLException
buf
- a DIRECT Buffer
value with the image data
SDLSurface
SDLException
- if an error occurspublic static SDLSurface load(byte[] data) throws SDLException
data
- a byte[]
value
SDLSurface
SDLException
- if an error occurs
This method automatically creates the NIO Direct Buffer from the given byte array
public static SDLSurface load(java.net.URL url) throws SDLException, java.io.IOException, java.net.MalformedURLException
url
- an URL
value
SDLSurface
SDLException
- if an error occurs
This method automatically creates the NIO Direct Buffer
java.io.IOException
java.net.MalformedURLException
public static SDLSurface load(java.io.InputStream in) throws SDLException, java.io.IOException
in
- an InputStream
value
SDLSurface
SDLException
- if an error occurs
This method automatically creates the NIO Direct Buffer
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |