package yi.iu.processor.channel;

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

public class I3ChnlMaker extends yi.iu.processor.channel.ChannelMaker
{
    public int[] getProcessed(int rgb[], Dimension d)
    {
	    int width=d.width, height=d.height;
	    int size=width*height;
	    int[] i3= 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;
	        i3[i]= (2*green-red-blue)/4+128;
	    }
	    return i3;
    }

}