Write a method to keep just the blue color. This means to set all the green and red values to zero.

What will be an ideal response?


```
/**
* Method to keep only the blue in a picture
*/
public void keepBlue ( )
{
Pixel [ ] pixelAr ray = this . g e tPixels ( ) ;
int value = 0 ;
for ( Pixel currPi xel : pixelArray )
{
value = currPi x e l . getGreen ( ) ;
currPixel . setColor (new Color ( 0 , 0 , value ) ) ;
}
}
```

Computer Science & Information Technology

You might also like to view...

The shape of a video can be edited in PowerPoint

Indicate whether the statement is true or false

Computer Science & Information Technology

An amortization table shows the interest rate for each payment

Indicate whether the statement is true or false

Computer Science & Information Technology

An inline style is stored in the Head section of the XHTML file for a Web page.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

To use different page number formats within the same document, format the preliminary pages and the remainder of the report as separate ____.

A. documents B. pages C. sections D. files

Computer Science & Information Technology