jarp
Class ImageHandler

java.lang.Object
  extended by jarp.ImageHandler

public class ImageHandler
extends java.lang.Object

A handler for a Java ARP texture image.


Constructor Summary
ImageHandler(JAOptions jopts)
          Basic constructor, establishes JA options and primary avatar definition input path, as specified.
 
Method Summary
 int getGLTextureID()
           
 void loadTextureFromStreamV21(javax.media.opengl.GL2 gl, javax.media.opengl.glu.gl2.GLUgl2 glu, JAInputStream jins)
          Loads texture from stream, supporting v2.1 avatar format.
 void loadTextureFromStreamV22(javax.media.opengl.GL2 gl, javax.media.opengl.glu.gl2.GLUgl2 glu, JAInputStream jins, boolean COMPRESSED, boolean PNG, boolean IS_V_FLIPPED)
          Loads texture from stream, supporting v2.2 (and later) avatar format.
 void loadTextureFromURL(javax.media.opengl.GL2 gl, javax.media.opengl.glu.gl2.GLUgl2 glu, java.lang.String IMG_URL_STR)
          Loads the texture from the given URL (in v2.2 avatar format), with the other settings taken from the current JA options.
 void loadTextureFromURL(javax.media.opengl.GL2 gl, javax.media.opengl.glu.gl2.GLUgl2 glu, java.lang.String IMG_URL_STR, boolean IS_V22)
          Loads the texture from the given URL, with v2.2 or v2.1 avatar format as determined by the given flag parameter, and with the other settings taken from the current JA options.
 void loadTextureFromURL(javax.media.opengl.GL2 gl, javax.media.opengl.glu.gl2.GLUgl2 glu, java.net.URL IMG_URL, boolean COMPRESSED, boolean PNG, boolean IS_V_FLIPPED)
          Loads the texture from the specified URL, in accordance with the specified flags, in v2.2 format.
 void loadTextureFromURL(javax.media.opengl.GL2 gl, javax.media.opengl.glu.gl2.GLUgl2 glu, java.net.URL IMG_URL, boolean COMPRESSED, boolean PNG, boolean IS_V_FLIPPED, boolean IS_V22)
          Loads the texture from the specified URL, in accordance with the specified flags.
 void saveJAImageAsPNG(JAOutputStream jouts, boolean vflippedpng)
          Saves this handler's image in PNG format on the specified stream prefixed with its size in bytes, vertically flipped or not as specified.
 void saveJAImageAsPNG(java.lang.String pngpath, boolean vflippedpng)
          Saves this handler's image in PNG format on the specified file, vertically flipped or not as specified.
 void saveJAImageToFile()
          Saves this handler's image to a file in JIB (JA image bytes) format (v2.2 avatar definition format), using the JA options to determine the file name and compression flag setting.
 void saveJAImageToFile(java.lang.String outpath, boolean COMPRESS)
          Saves this handler's image to the specified file in JIB (JA image bytes) format (v2.2 or avatar definition format), with the specified compression settting.
 void saveJAImageToStream(JAOutputStream jouts, boolean compress)
          Saves this handler's image as a JA image on the given stream (format is v2.2).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageHandler

public ImageHandler(JAOptions jopts)
Basic constructor, establishes JA options and primary avatar definition input path, as specified.

Method Detail

getGLTextureID

public int getGLTextureID()

loadTextureFromURL

public void loadTextureFromURL(javax.media.opengl.GL2 gl,
                               javax.media.opengl.glu.gl2.GLUgl2 glu,
                               java.lang.String IMG_URL_STR)
                        throws java.io.IOException,
                               JAException
Loads the texture from the given URL (in v2.2 avatar format), with the other settings taken from the current JA options.

Throws:
java.io.IOException
JAException

loadTextureFromURL

public void loadTextureFromURL(javax.media.opengl.GL2 gl,
                               javax.media.opengl.glu.gl2.GLUgl2 glu,
                               java.lang.String IMG_URL_STR,
                               boolean IS_V22)
                        throws java.io.IOException,
                               JAException
Loads the texture from the given URL, with v2.2 or v2.1 avatar format as determined by the given flag parameter, and with the other settings taken from the current JA options.

Throws:
java.io.IOException
JAException

loadTextureFromURL

public void loadTextureFromURL(javax.media.opengl.GL2 gl,
                               javax.media.opengl.glu.gl2.GLUgl2 glu,
                               java.net.URL IMG_URL,
                               boolean COMPRESSED,
                               boolean PNG,
                               boolean IS_V_FLIPPED)
                        throws java.io.IOException,
                               JAException
Loads the texture from the specified URL, in accordance with the specified flags, in v2.2 format.

Throws:
java.io.IOException
JAException

loadTextureFromURL

public void loadTextureFromURL(javax.media.opengl.GL2 gl,
                               javax.media.opengl.glu.gl2.GLUgl2 glu,
                               java.net.URL IMG_URL,
                               boolean COMPRESSED,
                               boolean PNG,
                               boolean IS_V_FLIPPED,
                               boolean IS_V22)
                        throws java.io.IOException,
                               JAException
Loads the texture from the specified URL, in accordance with the specified flags.

Throws:
java.io.IOException
JAException

loadTextureFromStreamV21

public void loadTextureFromStreamV21(javax.media.opengl.GL2 gl,
                                     javax.media.opengl.glu.gl2.GLUgl2 glu,
                                     JAInputStream jins)
                              throws java.io.IOException,
                                     JAException
Loads texture from stream, supporting v2.1 avatar format.

Throws:
java.io.IOException
JAException

loadTextureFromStreamV22

public void loadTextureFromStreamV22(javax.media.opengl.GL2 gl,
                                     javax.media.opengl.glu.gl2.GLUgl2 glu,
                                     JAInputStream jins,
                                     boolean COMPRESSED,
                                     boolean PNG,
                                     boolean IS_V_FLIPPED)
                              throws java.io.IOException,
                                     JAException
Loads texture from stream, supporting v2.2 (and later) avatar format.

Throws:
java.io.IOException
JAException

saveJAImageToFile

public void saveJAImageToFile()
                       throws java.io.IOException
Saves this handler's image to a file in JIB (JA image bytes) format (v2.2 avatar definition format), using the JA options to determine the file name and compression flag setting.

Throws:
java.io.IOException

saveJAImageToFile

public void saveJAImageToFile(java.lang.String outpath,
                              boolean COMPRESS)
                       throws java.io.IOException
Saves this handler's image to the specified file in JIB (JA image bytes) format (v2.2 or avatar definition format), with the specified compression settting.

Throws:
java.io.IOException

saveJAImageToStream

public void saveJAImageToStream(JAOutputStream jouts,
                                boolean compress)
                         throws java.io.IOException
Saves this handler's image as a JA image on the given stream (format is v2.2).

Throws:
java.io.IOException

saveJAImageAsPNG

public void saveJAImageAsPNG(java.lang.String pngpath,
                             boolean vflippedpng)
                      throws java.io.IOException
Saves this handler's image in PNG format on the specified file, vertically flipped or not as specified.

Throws:
java.io.IOException

saveJAImageAsPNG

public void saveJAImageAsPNG(JAOutputStream jouts,
                             boolean vflippedpng)
                      throws java.io.IOException
Saves this handler's image in PNG format on the specified stream prefixed with its size in bytes, vertically flipped or not as specified.

Throws:
java.io.IOException