I want convert the colors of the image from ICC_ColorSpace ( PhotoCamera ) into ICC_ColorSpace ( Monitor ).
I realized the "profile.icc" with PROFILE MAKER a software program of GretagMacbeth.
This is my java source.
 
 
 static ICC_Profile[] profile = new ICC_Profile[2];
 try
 {
  profile[0] = (ICC_Profile) ICC_Profile.getInstance(argv[0]);
 }
 catch (IOException ioe)
 {
  ioe.printStackTrace();
  System.exit(0);
 }
 try
 {
  profile[1] = (ICC_Profile) ICC_Profile.getInstance(argv[1]);
 }
 catch (IOException ioe)
 {
  ioe.printStackTrace();
  System.exit(0);
 }
......
 
 Image  img = getToolkit().getImage(argNomeFile);
.......
 
 BufferedImage srcImg = new BufferedImage(iw, ih, BufferedImage.TYPE_INT_RGB);
 Graphics2D srcG = srcImg.createGraphics();
 srcG.drawImage(img, 0, 0, null);
 
 ColorConvertOp theOp = new ColorConvertOp(profile, null);
 
 BufferedImage dstImg = theOp.filter(srcImg, null);
 
Unfortunately the result got is not very satisfactory.
Please advise if the java methods were used in the correct way, or where could be the error ?
 
Hoping to receive your reply, best regards
 
Giuseppe Raddi
Italy

Reply via email to