container.buildDrawingCache();
container.setDrawingCacheEnabled(
true
);
Bitmap captureView = container.getDrawingCache();
FileOutputStream fos;
Intent it3=getIntent();
String str_name=it3.getStringExtra(
"it3_name"
);
File fileRoute =
null
;
fileRoute = Environment.getExternalStorageDirectory();
BitmapFactory.Options options =
new
BitmapFactory.Options();
options.inSampleSize =
4
;
Bitmap src = BitmapFactory.decodeFile(fileRoute+
"/play/"
+str_name+
"-.jpeg"
, options);
Bitmap resized = Bitmap.createScaledBitmap(src,
384
,
770
,
true
);
try
{
File path =
new
File(fileRoute+
"/play"
);
if
(!path.isDirectory()){
path.mkdirs();
}
fos =
new
FileOutputStream(fileRoute+
"/play/-"
+str_name+
"-.jpeg"
);
resized.compress(Bitmap.CompressFormat.JPEG,
100
, fos);
}
catch
(FileNotFoundException e) {
e.printStackTrace();
}
Toast.makeText(getApplicationContext(),
"/sdcard/play으로 저장되었습니다."
, Toast.LENGTH_LONG).show();