Create a movie that has a JPEG image rotating in it.
What will be an ideal response?
```
/**
* Method to c r e a t e a r o t a t i n g image movie
* @param p the p i c t u r e to r o t a t e
* @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 makeRotatingMovie ( Pi c tur e p , St r ing d i r e c t o r y )
{
// make a copy of the p i c t u r e
Pi c tur e tempPict = nul l ;
int max = Math .max(p . getWidth ( ) , p . ge tHe ight ( ) ) ;
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++)
tempPict = new Pi c tur e (p ) ;
tempPict = tempPict . r o t a t e ( i * 5 ) ;
copyPict = new Pi c tur e (max ,max ) ;
copyPict . copy ( tempPict , 0 , 0 ) ;
f rameSequencer . addFrame ( copyPict ) ;
}
// p lay the movie
f rameSequencer . play ( f ramesPerSec ) ;
}
```
You might also like to view...
If you set the ________ or No changes (Read only) restrictions, you can specify user exceptions for a document
A) Fillin in Forms B) Comments C) Tracked Change D) Styles
________ color is the background color of a cell
Fill in the blank(s) with the appropriate word(s).