Class BitRotator
java.lang.Object
com.twelvemonkeys.imageio.plugins.pcx.BitRotator
IFFUtil
Bit 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(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
-
Field Details
-
RTABLE
private static final long[][] RTABLE
-
-
Constructor Details
-
BitRotator
BitRotator()
-
-
Method Details
-
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
-