diff options
author | Sven Gothel <[email protected]> | 2009-10-04 17:11:11 -0700 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-10-04 17:11:11 -0700 |
commit | 7997824464198164a74f4d20620d2f432578024c (patch) | |
tree | dd8c288d66d279f10f9edb4d35d8abeb03ccf164 /src/demos/readbuffer/ReadBuffer2File.java | |
parent | 4b9a72c24bb97ed81c79c3931d4ffb5fa53d9978 (diff) |
ReadBuffer Demos: Use NetPbmTextureWriter
Diffstat (limited to 'src/demos/readbuffer/ReadBuffer2File.java')
-rwxr-xr-x | src/demos/readbuffer/ReadBuffer2File.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/demos/readbuffer/ReadBuffer2File.java b/src/demos/readbuffer/ReadBuffer2File.java index 9b96d9b..2b30acf 100755 --- a/src/demos/readbuffer/ReadBuffer2File.java +++ b/src/demos/readbuffer/ReadBuffer2File.java @@ -37,7 +37,7 @@ import java.nio.*; import javax.media.opengl.*; import com.sun.opengl.util.texture.TextureData; -import com.sun.opengl.util.texture.spi.awt.IIOTextureWriter; +import com.sun.opengl.util.texture.spi.NetPbmTextureWriter; import java.io.File; import java.io.IOException; @@ -53,14 +53,14 @@ public class ReadBuffer2File extends ReadBufferBase { super.dispose(drawable); } - IIOTextureWriter textureWriter = new IIOTextureWriter(); + NetPbmTextureWriter textureWriter = new NetPbmTextureWriter(6); int shotNum=0; void copyTextureData2File() { if(!readBufferUtil.isValid()) return; try { - textureWriter.write(new File("/tmp/shot/shot-"+shotNum+".jpg"), readBufferUtil.getTextureData()); + textureWriter.write(new File("/tmp/shot/shot-"+shotNum+"."+textureWriter.getSuffix()), readBufferUtil.getTextureData()); shotNum++; } catch (IOException ioe) { ioe.printStackTrace(); } readBufferUtil.rewindPixelBuffer(); |