From 64e1a26760d19614122ccbd238a7a1bbdb78720c Mon Sep 17 00:00:00 2001 From: Son Hyunjun Date: Wed, 4 Apr 2012 20:47:57 +0900 Subject: [PATCH] [Title] fix bug : strange color image on clipboard in Windows ScreenShot dialog [Type] Bugfix [Module] Skin [Priority] Minor [CQ#] [Redmine#] [Problem] need change RGB mask of raw image format in Windows [Cause] [Solution] Change-Id: Ica038aa6390a3386eb76b480683a7e3f2f6658e9 --- .../org/tizen/emulator/skin/screenshot/ScreenShotDialog.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java index 1c54e0a..b8341ee 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java @@ -402,7 +402,17 @@ public class ScreenShotDialog { } ImageLoader loader = new ImageLoader(); - loader.data = new ImageData[] { image.getImageData() }; + + if ( SkinUtil.isWindowsPlatform() ) { + // change RGB mask + ImageData imageData = image.getImageData(); + PaletteData paletteData = new PaletteData( BLUE_MASK, GREEN_MASK, RED_MASK ); + ImageData data = new ImageData( imageData.width, imageData.height, imageData.depth, paletteData, + imageData.bytesPerLine, imageData.data ); + loader.data = new ImageData[] { data }; + } else { + loader.data = new ImageData[] { image.getImageData() }; + } ByteArrayOutputStream bao = new ByteArrayOutputStream(); loader.save( bao, SWT.IMAGE_PNG ); -- 2.7.4