Remember the blending of pictures)? Try blending one picture into another as a movie, slowly increasing the percentage of the sec- ond (incoming) image while decreasing the percentage of the original (outgoing) image.
What will be an ideal response?
```
t u r t l /**
* Method to c r e a t e a movie where one p i c t u r e b l end s
* int o the o the r
* @param d i r e c t o r y the d i r e c t o r y to s t o r e the frames in
*/
public void makeBlendedMovie ( St r ing d i r e c t o r y )
{
// g e t the p i c t u r e s to b l end
Pi c tur e p i c t 1 = new Pi c tur e ( Fi l eChoos e r . getMediaPath ( "beach . jpg " ) ) ;
Pi c tur e p i c t 2 = new Pi c tur e ( Fi l eChoos e r . getMediaPath ( " blueShrub . jpg " ) ) ;
Pi c tur e copyPict = nul l ;
// d e c l a r e o the r v a r i a b l e s
FrameSequencer f rameSequencer =
new FrameSequencer ( d i r e c t o r y ) ;
int f ramesPerSec = 3 0 ;
// loop c r e a t i n g the frames
for ( int i = 0 ; i < f ramesPerSec ; i++)
{
copyPict = new Pi c tur e ( p i c t 1 ) ;
copyPict =
copyPict . bl endPi c tur e s ( pi c t2 , ( ( double ) i ) / f ramesPerSec ) ;
f rameSequencer . addFrame ( copyPict ) ;
}
// p lay the movie
f rameSequencer . play ( f ramesPerSec ) ;
}
```
You might also like to view...
Voice-recognition software enables users to verbally control a computer and dictate text
Indicate whether the statement is true or false
By default JScrollPane ________.
a. always displays scrollbars b. never displays scrollbars c. only displays scrollbars if they are needed d. None of the above