From 7997824464198164a74f4d20620d2f432578024c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 4 Oct 2009 17:11:11 -0700 Subject: ReadBuffer Demos: Use NetPbmTextureWriter --- src/demos/readbuffer/ReadBuffer2File.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/demos/readbuffer/ReadBuffer2File.java') 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(); -- cgit v1.2.3