diff options
author | Kenneth Russel <[email protected]> | 2006-01-09 02:37:43 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-01-09 02:37:43 +0000 |
commit | b464faaae70ba12e5842b901a6c6d1601af0e1c7 (patch) | |
tree | 6411322c882c48dfe04870adf981c33609fabefa /src/classes/com/sun/opengl/utils/TextureData.java | |
parent | c1e4d8a8937ecce5bbc88c6de604ce35e793b9cc (diff) |
Added output support to TGAImage, SGIImage and newly-renamed DDSImage
classes. Added support to TextureIO for writing textures back to disk
via new TextureWriter plug-in interface. Added TextureConvert demo
which shows how an application might convert between arbitrary file
formats using these APIs, including automatic compression to DXT3
format when available.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@525 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/utils/TextureData.java')
-rwxr-xr-x | src/classes/com/sun/opengl/utils/TextureData.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/classes/com/sun/opengl/utils/TextureData.java b/src/classes/com/sun/opengl/utils/TextureData.java index a6fcd9073..6bb459432 100755 --- a/src/classes/com/sun/opengl/utils/TextureData.java +++ b/src/classes/com/sun/opengl/utils/TextureData.java @@ -316,16 +316,7 @@ public class TextureData { private void createNIOBufferFromImage(BufferedImage image, boolean flipVertically) { if (flipVertically) { - WritableRaster raster = image.getRaster(); - Object scanline1 = null; - Object scanline2 = null; - - for (int i = 0; i < image.getHeight() / 2; i++) { - scanline1 = raster.getDataElements(0, i, image.getWidth(), 1, scanline1); - scanline2 = raster.getDataElements(0, image.getHeight() - i - 1, image.getWidth(), 1, scanline2); - raster.setDataElements(0, i, image.getWidth(), 1, scanline2); - raster.setDataElements(0, image.getHeight() - i - 1, image.getWidth(), 1, scanline1); - } + TextureIO.flipImageVertically(image); } // |