diff options
author | Sven Gothel <[email protected]> | 2014-02-13 01:06:31 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-02-13 01:06:31 +0100 |
commit | 8631e403aa0c02c53b06819ef9b112af1885d4f7 (patch) | |
tree | b60e4445de4b1c90e375150a13894b8eb774441e | |
parent | 1d2515da352a79c239efecdfa3e0fade47779781 (diff) |
TextureIO: Fix PNGTextureWriter Vertical-Flip, i.e. pass TextureData's getMustFlipVertically() to PNGPixelRect
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java index c29bd9af2..0f64fd007 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java @@ -1414,7 +1414,7 @@ public class TextureIO { final ByteBuffer buf = (ByteBuffer) buf0; buf.rewind(); final PNGPixelRect image = new PNGPixelRect(pixFmt, size, - 0 /* stride */, true /* isGLOriented */, buf /* pixels */, + 0 /* stride */, !data.getMustFlipVertically() /* isGLOriented */, buf /* pixels */, -1f, -1f); final OutputStream outs = new BufferedOutputStream(IOUtil.getFileOutputStream(file, true /* allowOverwrite */)); image.write(outs, true /* close */); @@ -1424,7 +1424,7 @@ public class TextureIO { buf.rewind(); final OutputStream outs = new BufferedOutputStream(IOUtil.getFileOutputStream(file, true /* allowOverwrite */)); PNGPixelRect.write(pixFmt, size, - 0 /* stride */, true /* isGLOriented */, buf /* pixels */, + 0 /* stride */, !data.getMustFlipVertically() /* isGLOriented */, buf /* pixels */, -1f, -1f, outs, true /* closeOutstream */); return true; } else { |