From 94ea306d1809290db678d3181619bdc39d4334bb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 27 Apr 2013 01:38:12 +0200 Subject: Move JPEGDecoder.PixelStorage -> TextureData.ColorSink: Appropriate name + public use --- .../classes/jogamp/opengl/util/jpeg/JPEGDecoder.java | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/util') diff --git a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java index 748e70d5b..8df147405 100644 --- a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java +++ b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java @@ -67,6 +67,7 @@ import jogamp.opengl.Debug; import com.jogamp.common.util.ArrayHashSet; import com.jogamp.common.util.VersionNumber; import com.jogamp.opengl.util.texture.TextureData.ColorSpace; +import com.jogamp.opengl.util.texture.TextureData.ColorSink; /** * @@ -88,21 +89,6 @@ public class JPEGDecoder { private static final boolean DEBUG = Debug.debug("JPEGImage"); private static final boolean DEBUG_IN = false; - public static interface PixelStorage { - /** - * @param width - * @param height - * @param sourceCS the color-space of the decoded JPEG - * @param sourceComponents number of components used for the given source color-space - * @return Either {@link ColorSpace#RGB} or {@link ColorSpace#YCbCr}. {@link ColorSpace#YCCK} and {@link ColorSpace#CMYK} will throw an exception! - * @throws RuntimeException - */ - public ColorSpace allocate(int width, int height, ColorSpace sourceCS, int sourceComponents) throws RuntimeException; - public void store2(int x, int y, byte c1, byte c2); - public void storeRGB(int x, int y, byte r, byte g, byte b); - public void storeYCbCr(int x, int y, byte Y, byte Cb, byte Cr); - } - public static class JFIF { final VersionNumber version; final int densityUnits; @@ -1347,7 +1333,7 @@ public class JPEGDecoder { pixelStorage.storeRGB(x, y, (byte)R, (byte)G, (byte)B); } */ - public synchronized void getPixel(PixelStorage pixelStorage, int width, int height) { + public synchronized void getPixel(ColorSink pixelStorage, int width, int height) { final int scaleX = this.width / width, scaleY = this.height / height; final int componentCount = this.components.length; -- cgit v1.2.3