|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcore.postprocessing.Periodify
Blends together frames of an animation to produce a continuous loop. An output image sequence is created by blending together pairs of images from an input image sequence. The contrast is adjusted, assuming that the image pairs are uncorrelated.
| Field Summary | |
(package private) static byte[] |
bytes
|
(package private) static java.io.FileOutputStream |
file
|
(package private) static int |
frames
Number of output sequence frames. |
(package private) static int |
height
Height of the image. |
(package private) static java.lang.String |
infname
Input sequence filename. |
(package private) static java.lang.String |
outfname
Output sequence filename. |
(package private) static int |
overlap
Number of overlap frames. |
(package private) static int |
width
Width of the image. |
| Constructor Summary | |
Periodify()
|
|
| Method Summary | |
(package private) static void |
Blend(byte[] buf0,
byte[] buf1,
double blend,
byte[] buf)
Blends together two images "buf0" and "buf1" to produce "buf" using the blending coefficient "blend". |
(package private) static double |
blend(int frame)
Returns the blending coefficient for output frame "frame". |
(package private) static int |
frame0(int frame)
Returns one of the input images to blend for output frame "frame". |
(package private) static int |
frame1(int frame)
Returns the other input image to blend for the output frame "frame". |
(package private) static int |
i(byte b)
For byte b >= 0 return int b, otherwise return 256 + int b. |
(package private) static void |
LoadMonoTGA(java.lang.String fname,
byte[] buf)
Loads a monochrome TGA image specified by "fname" into the byte buffer "buf". |
static void |
main(java.lang.String[] args)
Creates and writes the blended image files. |
private static java.lang.String |
PadZeros(int x,
int len)
Returns a string representation of "x" that is padded with zeros up to a length "len". |
private static void |
print(java.lang.String s)
Output routine for strings. |
private static void |
println(java.lang.String s)
Output routine for strings. |
(package private) static int |
round(double x)
Round a double up to the nearest integer. |
(package private) static void |
SaveMonoTGA(java.lang.String fname,
byte[] buf)
Writes a monochrome TGA image specified by "fname" using the image data in "buf", and the image dimensions specified by "width" and "height". |
(package private) static void |
WriteByte(int x)
Write byte to file. |
(package private) static void |
WriteWord(int x)
Write word to file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static int width
static int height
static java.lang.String infname
static java.lang.String outfname
static int frames
static int overlap
static java.io.FileOutputStream file
static byte[] bytes
| Constructor Detail |
public Periodify()
| Method Detail |
static int frame0(int frame)
frame - The number of the output frame to be blended.
static int frame1(int frame)
frame - The number of the output frame to be blended.
static double blend(int frame)
frame - The number of the output frame to be blended.
public static void main(java.lang.String[] args)
static void LoadMonoTGA(java.lang.String fname,
byte[] buf)
fname - The name of the input TGA image.buf - The buffer into which the image is loaded.
static void SaveMonoTGA(java.lang.String fname,
byte[] buf)
fname - The name of the input TGA image.buf - The buffer into which the image has been loaded.
static void Blend(byte[] buf0,
byte[] buf1,
double blend,
byte[] buf)
buf0 - The first image to be blended.buf1 - The second image to be blended.blend - The blending coefficient (blend = 0 gives all "buf0").buf - The blended image.static int i(byte b)
b - The byte.
static int round(double x)
x - The double to be rounded.
static void WriteByte(int x)
throws java.io.IOException
x - The byte to be written.
java.io.IOException
static void WriteWord(int x)
throws java.io.IOException
x - The word to be written.
java.io.IOException
private static java.lang.String PadZeros(int x,
int len)
x - The string for the maximum number of pad zeroes.len - The length of the output string that is x plus the padding zeroes.
private static void println(java.lang.String s)
s - The string to be output.private static void print(java.lang.String s)
s - The string to be output.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||