Create a movie that takes a image and slowly creates the negative of the image.

What will be an ideal response?


```
/? ?
? Method t o c r e a t e a movie where t h e p i c t u r e c h a n g e s
? t o t h e n e g a t i v e image
? @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 makeNegativeMovie ( 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 n e g a t i v e p i c t u r e
p . negate ( ) ;
// 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 ) ;
}
```

Computer Science & Information Technology

You might also like to view...

Hint: What the function does is immaterial. We are only interested in the details of the header in the implementation. Use the following for the function body if you wish.

Given the (incomplete) class template below, complete the template and show how to implement the function member whose declaration in class template below is: void f(T x); ``` { //whatever f does } // template class Problem: template class Problem { public: . . . void f( T x ); private: int x; }; ```

Computer Science & Information Technology

Which type of memory is erasable by exposing it to an electrical charge?

A. EPROM B. ROM C. EEPOM D. PROM

Computer Science & Information Technology

The signal RESET is asserted. What does this statement mean?

What will be an ideal response?

Computer Science & Information Technology

Item A in the accompanying figure is the _______________ .

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology