return scaledRgbData;
	public static int[] scale(int scaledWidth, int scaledHeight, int scanlength, int sourceWidth, int sourceHeight, int[] rgbData) {		int scaledRgbData[] = new int[scaledWidth * scaledHeight];		for (int y = 0; y < scaledHeight; y++) {			int c1 = y * scaledWidth;			int c2 = (y * sourceHeight / scaledHeight) * scanlength;			for (int x = 0; x < scaledWidth; x++) {				scaledRgbData[c1 + x] = rgbData[c2 + x * sourceWidth / scaledWidth];			}		}		return scaledRgbData;	}