String path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "/"
+ String.valueOf((new Date()).getTime()) + ".png";
OutputStream out = null;
File file = new File(path);
try {
out = new FileOutputStream(file);
bm.compress(Bitmap.CompressFormat.PNG, 100, out);
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
path = file.getPath();
Uri bmpUri = Uri.parse("file://" + path);
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
shareIntent.putExtra(Intent.EXTRA_STREAM, bmpUri);
shareIntent.setType("image/png");
startActivity(Intent.createChooser(shareIntent, "Share with"));
위 소스를 이용해서 공유하기 기능을 구현하였습니다.
기능은 잘 되는데, 문제는 큰 이미지(대략 900px x 5000px이상)를 카카오톡 등으로 공유하면 이미지가 자동으로 축소됩니다. 이미지에 글씨가 많아 축소가 되면 안보여서 안되는데 원본크기로 공유할 방법이 없을까요?