Create a movie that has the frames slowly becoming sepia-toned. The following is in the Picture class in the directory bookClassesFinal.
What will be an ideal response?
```
/? ?
? Modify t h e c u r r e n t p i c t u r e b a s e d on t h e d i s t a n c e t o t h e
? f i n a l p i c t u r e , t h e c u r r e n t i n d e x , and t h e t o t a l d i s t a n c e
? @param f i n a l P i c t t h e d e s i r e d f i n a l p i c t u r e
? @param i n d e x t h e c u r r e n t i n d e x
? @param d i s t t h e t o t a l d i s t a n c e t o t h e f i n a l p i c t u r e
?/
public void modifyTowards ( P i c t u r e f i n a l P i c t , in t index , double d i s t )
{
Pixel [ ] pixelArray = this . g e t P i x e l s ( ) ;
Pixel [ ] finalPixelArray = finalPict . getPixels ( ) ;
P i x e l c u r r P i x e l = null ;
P i x e l f i n a l P i x e l = null ;
double r e d D i s t , b l u e D i s t , g r e e n D i s t ;
C o l o r p i c t C o l o r = null ;
// l o o p t h r o u g h t h e a r r a y o f p i x e l s
f o r ( i n t i = 0 ; i < p i x e l A r r a y . l e n g t h ; i ++)
{
currPixel = pixelArray [ i ] ;
finalPixel = finalPixelArray [ i ] ;
r e d D i s t = f i n a l P i x e l . getRed ( ) ? c u r r P i x e l . getRed ( ) ;
blueDist = f i n a l P i x e l . getBlue () ? currPixel . getBlue ( ) ;
g r e e n D i s t = f i n a l P i x e l . getGreen ( ) ? c u r r P i x e l . getGreen ( ) ;
p i c t C o l o r = new C o l o r ( ( in t ) ( i n d e x / d i s t ? r e d D i s t + c u r r P i x e l . getRed ( ) ) ,
( in t ) ( i n d e x / d i s t ? g r e e n D i s t + c u r r P i x e l . getGreen ( ) ) ,
( in t ) ( i n d e x / d i s t ? b l u e D i s t + c u r r P i x e l . g e t B l u e ( ) ) ) ;
currPixel . setColor ( pictColor ) ;
}
}
```
The following is from the MovieMaker class in the directory bookClassesFinal.
```
/? ?
? Method t o c r e a t e a s e p i a ?t o n e d movie
? @param p t h e p i c t u r e t o u s e i n t h e movie
? @param d i r e c t o r y t h e d i r e c t o r y t o s t o r e t h e frame s i n
?/
public void makeSepiaMovie ( P i c t u r e p , S t r i n g d i r e c t o r y )
{
// make a copy o f t h e p i c t u r e
P i c t u r e c o p y P i c t = null ;
P i c t u r e o r i g P i c t = new P i c t u r e ( p ) ;
// make a s e p i a ?t o n e d p i c t u r e
p . sepiaTint ( ) ;
// d e c l a r e o t h e r v a r i a b l e s
FrameSequencer f r a m e S e q u e n c e r =
new FrameSequencer ( d i r e c t o r y ) ;
int framesPerSec = 3 0 ;
// l o o p c r e a t i n g t h e frames
f o r ( i n t i = 0 ; i < f r a m e s P e r S e c ; i ++)
{
c o p y P i c t = new P i c t u r e ( o r i g P i c t ) ;
c o p y P i c t . modifyTowards ( p , i , f r a m e s P e r S e c ) ;
f r a m e S e q u e n c e r . addFrame ( c o p y P i c t ) ;
}
// p l a y t h e movie
frameSequencer . play ( framesPerSec ) ;
}
```
You might also like to view...
Which of the following is a difference between bitmap images and vector images?
A. ?Bitmap images use mathematical formulas to represent image content, whereas vector images are created by coloring pixels. B. ?Bitmap images cannot be enlarged and still maintain their quality, whereas vector images can be resized and otherwise manipulated without loss of quality. C. ?Bitmap images are programmed in terms of numbers, whereas vector images are programmed in terms of characters. D. ?Bitmap images are usually named with the extension .XLSX, whereas vector images are named with the extension .VNP.
When you open a new blank document in Word, you use the ________ template
Fill in the blank(s) with correct word
Cathy is planning to purchase a new audio and video editing workstation to make work videos. What types of components will Cathy need to order to build her computer? (Select all that apply.)
A. High-end video card B. Two 4TB SATA 3 Drives C. 16GB of DDR 4 RAM D. High-end sound card E. Blu-ray burner
Why is it called a foreign column??
A. ?It is written in a different language. B. ?It refers to a field in one table that uniquely identifies a row in a different table. C. ?It does not belong in this table. D. ?It requires a different formula for analyzing the data.