[Title] bug fix save image file in Screenshot dialog
authorSon Hyunjun <hj79.son@samsung.com>
Mon, 26 Mar 2012 16:10:55 +0000 (01:10 +0900)
committerSon Hyunjun <hj79.son@samsung.com>
Mon, 26 Mar 2012 16:10:55 +0000 (01:10 +0900)
[Type] Bugfix
[Module]
[Priority] Minor
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]

Change-Id: I76925ceeec9f2ce566d3b6b3e266040ca3b0e451

tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java

index c2cf1ce..941e2fc 100644 (file)
@@ -474,16 +474,17 @@ public class ScreenShotDialog extends Dialog {
                                }
                        }
 
-                       fos = new FileOutputStream( fileFullPath, false );
-
                        ImageLoader loader = new ImageLoader();
                        loader.data = new ImageData[] { image.getImageData() };
 
                        if ( StringUtil.isEmpty( format ) || format.equalsIgnoreCase( "png" ) ) {
+                               fos = new FileOutputStream( fileFullPath, false );
                                loader.save( fos, SWT.IMAGE_PNG );
                        } else if ( format.equalsIgnoreCase( "jpg" ) || format.equalsIgnoreCase( "jpeg" ) ) {
+                               fos = new FileOutputStream( fileFullPath, false );
                                loader.save( fos, SWT.IMAGE_JPEG );
                        } else if ( format.equalsIgnoreCase( "bmp" ) ) {
+                               fos = new FileOutputStream( fileFullPath, false );
                                loader.save( fos, SWT.IMAGE_BMP );
                        } else {