BufferedImage tempOUTImage = new BufferedImage(tempOUTWidth, tempOUTHeight, BufferedImage.TYPE_INT_ARGB);
// // fill the background with a transparent color.
Graphics g = tempOUTImage.getGraphics();
g.setColor(new Color(255,255,255,0));
g.fillRect(0,0,tempOUTWidth, tempOUTHeight);
// loop through the projected Envelope sampling the image.
double tempINWidthStep = tempINEnvelope.getWidth()/tempINWidth;
double tempINHeightStep = tempINEnvelope.getHeight()/tempINHeight;
double tempOUTWidthStep = tempOUTEnvelope.getWidth()/tempOUTWidth;