[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: SWT Image

update:

changed the code to:
		int[] pixels = new int[width*height];
		ImageData id = originalImage.getImageData();
		id.getPixels(0, 0, pixels.length, pixels, 0);
		
		manipulatedImage = new Image(this.getDisplay(), width, height);
		ImageData id2 = manipulatedImage.getImageData();
		id2.setPixels(0, 0, pixels.length, pixels, 0);
		manipulatedImage =  new Image(this.getDisplay(), id2);
		e.gc.drawImage(manipulatedImage, 0, 0);
now the image gets copied, but the colors get corrupt...