public static BufferedImage convertToARGB(BufferedImage image){
  if (image.getType() != BufferedImage.TYPE_INT_ARGB) {
    try {
      final BufferedImage raw_image=image;
      image=new BufferedImage(raw_image.getWidth(),raw_image.getHeight(),BufferedImage.TYPE_INT_ARGB);
      final ColorConvertOp xformOp=new ColorConvertOp(null);
      xformOp.filter(raw_image,image);
    }
 catch (    final Exception e) {
      LogWriter.writeLog("Exception " + e + " creating argb image");
    }
  }
  isUsingARGB=true;
  return image;
}

public static BufferedImage convertToARGB ( BufferedImage image ) { if ( image . getType ( ) != BufferedImage . TYPE_INT_ARGB ) { try { final BufferedImage raw_image = image ; image = new BufferedImage ( raw_image . getWidth ( ) , raw_image . getHeight ( ) , BufferedImage . TYPE_INT_ARGB ) ; final ColorConvertOp xformOp = new ColorConvertOp ( null ) ; xformOp . filter ( raw_image , image ) ; } catch ( final Exception e ) { LogWriter . writeLog ( "Exception " + e + " creating argb image" ) ; } } isUsingARGB = true ; return image ; }
convert a bufferedimage to rgb colourspace ( used when i clip the image ) .
