Here you can find the source of changeToTypeIntRGB(BufferedImage image)
public static BufferedImage changeToTypeIntRGB(BufferedImage image)
//package com.java2s; //License from project: Apache License import java.awt.image.BufferedImage; public class Main { public static BufferedImage changeToTypeIntRGB(BufferedImage image) { // Creates a new buffered image of type int rgb (the one we need for everything to work BufferedImage output = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_RGB); // Loops through all of original image and gives output the image properties (except for the new type output has) for (int y = 0; y < image.getHeight(); y++) for (int x = 0; x < image.getWidth(); x++) output.setRGB(x, y, image.getRGB(x, y)); return output; }//from w w w . j a v a2s. c o m }