import java.awt.*;
import java.awt.image.*;
import java.io.*;

// Channels the blue component of image
public class bluefilt extends EffectFilter
{
	// Create object
	public bluefilt()
	{
	}
	
	// Runs algorithm
	public void performEffect()
	{
		int newPixels[] = new int[width*height];
		int blue = 0;
		
		// Moves through the input array pixel by pixel
		for(int k=0;k<width*height;k++)
		{
			// Isolates blue component
			blue = (pixels[k]>>0)&0xff;
			
			// Outputs blue component in greyscale
			newPixels[k] = (255<<24 | (blue<<16) | (blue<<8) | blue);
		}

		this.pixels = newPixels;
	}
}
