Click here to Skip to main content
15,898,373 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Java
public class testing
{
    static BufferedImage image;
    public static void main(String[] args) throws IOException {
    
    ArrayList<Integer> l1=new ArrayList<Integer>();
    ArrayList<Integer> l2=new ArrayList<Integer>();
    ArrayList<Integer> l3=new ArrayList<Integer>();
    
    image = ImageIO.read(new File("nn33.png"));
    int w = image.getWidth();
    int h = image.getHeight();
    for (int y = 0; y < h; y++)
    {
        for (int x = 0; x < w; x++)
        {
        Color c = new Color(image.getRGB(x, y));
        int A=c.getRed()+3;
        l1.add(A);
        int B=c.getBlue()+2;
        l2.add(B);
        int C=c.getGreen();
        l3.add(C);
        
        
        
        }
    }
}

i will write above code but i write image again by using different color values how can i write.
Posted
Updated 17-Sep-13 21:31pm
v2
Comments
Richard MacCutchan 18-Sep-13 3:32am    
Not clear, please edit your question and explain in detail what your problem is.
ramamne9595@gmail.com 19-Sep-13 1:58am    
fist i read the image pixel by pixel after i getting each pixel color value. i am changing in that color pixel value and after that image is display according to new pixel color values
Shubhashish_Mandal 18-Sep-13 5:37am    
it seems to me that you are trying to improve the color of the image. this will help you

http://docs.oracle.com/javase/6/docs/api/java/awt/image/RGBImageFilter.html
http://docs.oracle.com/javase/6/docs/api/java/awt/image/FilteredImageSource.html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900