/Users/lyon/j4p/src/j2d/color/ColorSpaceProcessor.java

1    /* 
2     * Created by DocJava, Inc. 
3     * User: lyon 
4     * Date: Mar 1, 2003 
5     * Time: 9:45:14 AM 
6     */ 
7    package j2d.color; 
8     
9    import j2d.ImageUtils; 
10   import j2d.ImageProcessorInterface; 
11    
12   import java.awt.*; 
13    
14   public class ColorSpaceProcessor 
15           implements ImageProcessorInterface { 
16    
17       private float colorMatrix [][]; 
18    
19       public ColorSpaceProcessor(float colorMatrix [][]) { 
20           this.colorMatrix = colorMatrix; 
21    
22       } 
23    
24       public Image process(Image img) { 
25           return ImageUtils.changeColors(colorMatrix, img); 
26       } 
27    
28   } 
29