package yi.iu.processor.channel;

import java.awt.*;
import yi.iu.processor.channel.*;

public class I1ChnlMaker extends ChannelMaker
{
    public int[] getProcessed(int rgb[], Dimension d)
    {
	    int width=d.width, height=d.height;
	    int size=width*height;
	    int[] i1= new int[size];
	    
	    for (int i=0;i<size;i++) {
	        int red=rgb[i]>>16&255;
	        int green=rgb[i]>>8&255;
	        int blue=rgb[i]&255;
	        i1[i]= (red+green+blue)/3;
	    }
	    return i1;
    }

}