Class BitRotator
- java.lang.Object
-
- com.twelvemonkeys.imageio.plugins.pcx.BitRotator
-
final class BitRotator extends java.lang.Object
IFFUtilBit rotate methods based on Sue-Ken Yap, "A Fast 90-Degree Bitmap Rotator," in GRAPHICS GEMS II, James Arvo ed., Academic Press, 1991, ISBN 0-12-064480-0.
- Version:
- $Id: IFFUtil.java,v 1.0 06.mar.2006 13:31:35 haku Exp$
-
-
Field Summary
Fields Modifier and Type Field Description private static long[][]
RTABLE
-
Constructor Summary
Constructors Constructor Description BitRotator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static void
bitRotateCW(byte[] pSrc, int pSrcPos, int pSrcStep, byte[] pDst, int pDstPos, int pDstStep)
Rotate bits clockwise.private static long[]
rtable(int n)
Creates a rotation table
-
-
-
Method Detail
-
rtable
private static long[] rtable(int n)
Creates a rotation table- Parameters:
n
- number of bits -1- Returns:
- the rotation table
-
bitRotateCW
static void bitRotateCW(byte[] pSrc, int pSrcPos, int pSrcStep, byte[] pDst, int pDstPos, int pDstStep)
Rotate bits clockwise. The IFFImageReader uses this to convert pixel bits from planar to chunky. Bits from the source are rotated 90 degrees clockwise written to the destination.- Parameters:
pSrc
- source pixel datapSrcPos
- starting index of 8 x 8 bit source tilepSrcStep
- byte offset between adjacent rows in sourcepDst
- destination pixel datapDstPos
- starting index of 8 x 8 bit destination tilepDstStep
- byte offset between adjacent rows in destination
-
-