private static void rotate(int dd) {
		ImageData imageData = original.getImageData();

		int[][] matrix = new int[imageData.height][imageData.width];

		for (int i = 0; i < imageData.height; i++) {
			for (int j = 0; j < imageData.width; j++) {
				matrix[i][j] = imageData.getPixel(j, i);
			}
		}
		int[] pixels = ImageUtils.two2one(matrix);
		int iw = imageData.width;
		int ih = imageData.height;

		int owh = (int) Math.sqrt(iw * iw + ih * ih);
		int[] rotated = GT.rotate2(pixels, dd, iw, ih, owh);

		imageData = new ImageData(owh, owh, 8, imageData.palette);
		int[][] rotatedMatrix = ImageUtils.one2two(rotated, owh, owh);
		for (int i = 0; i < owh; i++) {
			for (int j = 0; j < owh; j++) {
				imageData.setPixel(j, i, rotatedMatrix[i][j]);
			}
		}

		rotate = new Image(original.getDevice(), imageData);
		rotateHisto = ImageUtils.analyzeHistogram(rotate.getImageData());
	}