From 51427b92a2d9cd3fc619854e26536c9c6adad947 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 2 Jul 2013 22:25:23 +0200 Subject: PNGJ: Bump to git sha1 a0b1101ba2d37de39428ed55c8189502e24a3125 of https://code.google.com/p/pngj/ --- .../classes/jogamp/opengl/util/pngj/ImageLine.java | 42 ++++++++++++++-------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java') diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java index 9f8a13230..e34e6a226 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java @@ -5,7 +5,8 @@ import jogamp.opengl.util.pngj.ImageLineHelper.ImageLineStats; /** * Lightweight wrapper for an image scanline, used for read and write. *

- * This object can be (usually it is) reused while iterating over the image lines. + * This object can be (usually it is) reused while iterating over the image + * lines. *

* See scanline field, to understand the format. */ @@ -18,21 +19,25 @@ public class ImageLine { private int rown = 0; /** - * The 'scanline' is an array of integers, corresponds to an image line (row). + * The 'scanline' is an array of integers, corresponds to an image line + * (row). *

- * Except for 'packed' formats (gray/indexed with 1-2-4 bitdepth) each int is a "sample" (one for - * channel), (0-255 or 0-65535) in the corresponding PNG sequence: R G B R G B... or + * Except for 'packed' formats (gray/indexed with 1-2-4 bitdepth) each + * int is a "sample" (one for channel), (0-255 or 0-65535) in + * the corresponding PNG sequence: R G B R G B... or * R G B A R G B A... * or g g g ... or i i i (palette index) *

- * For bitdepth=1/2/4 , and if samplesUnpacked=false, each value is a PACKED byte! + * For bitdepth=1/2/4 , and if samplesUnpacked=false, each value is a PACKED + * byte! *

- * To convert a indexed line to RGB balues, see ImageLineHelper.palIdx2RGB() (you can't do the reverse) + * To convert a indexed line to RGB balues, see + * ImageLineHelper.palIdx2RGB() (you can't do the reverse) */ public final int[] scanline; /** - * Same as {@link #scanline}, but with one byte per sample. Only one of scanline and scanlineb is valid - this - * depends on {@link #sampleType} + * Same as {@link #scanline}, but with one byte per sample. Only one of + * scanline and scanlineb is valid - this depends on {@link #sampleType} */ public final byte[] scanlineb; @@ -53,10 +58,11 @@ public class ImageLine { public final SampleType sampleType; /** - * true: each element of the scanline array represents a sample always, even for internally packed PNG formats + * true: each element of the scanline array represents a sample always, even + * for internally packed PNG formats * - * false: if the original image was of packed type (bit depth less than 8) we keep samples packed in a single array - * element + * false: if the original image was of packed type (bit depth less than 8) + * we keep samples packed in a single array element */ public final boolean samplesUnpacked; @@ -70,11 +76,14 @@ public class ImageLine { /** * * @param imgInfo - * Inmutable ImageInfo, basic parameter of the image we are reading or writing + * Inmutable ImageInfo, basic parameter of the image we are + * reading or writing * @param stype - * INT or BYTE : this determines which scanline is the really used one + * INT or BYTE : this determines which scanline is the really + * used one * @param unpackedMode - * If true, we use unpacked format, even for packed original images + * If true, we use unpacked format, even for packed original + * images * */ public ImageLine(ImageInfo imgInfo, SampleType stype, boolean unpackedMode) { @@ -226,7 +235,10 @@ public class ImageLine { } } - /** size original: samplesPerRow sizeFinal: samplesPerRowPacked (trailing elements are trash!) **/ + /** + * size original: samplesPerRow sizeFinal: samplesPerRowPacked (trailing + * elements are trash!) + **/ static void packInplaceByte(final ImageInfo iminfo, final byte[] src, final byte[] dst, final boolean scaled) { final int bitDepth = iminfo.bitDepth; if (bitDepth >= 8) -- cgit v1.2.3