Aktywność zwraca obraz

Chcę zwrócić bitmapę w mojej aktywności, aby inne aplikacje mogły z niej korzystać.

Zwrócenie tekstu jest jasne.

Intent data = new Intent();
data.putExtra("text1", "text.");
data.putExtra("text2", "longer text.");
setResult(RESULT_OK, data);

Ale jak zwrócić bitmapę?

Więcej informacji: Działanie ma kilka intencji, które mają być dostępne dla każdego, kto chce uzyskać obraz.

<intent-filter>
    <action android:name="android.intent.action.GET_CONTENT" />
    <category android:name="android.intent.category.OPENABLE" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="image/*" />
    <data android:mimeType="vnd.android.cursor.dir/image" />
</intent-filter>
<intent-filter>
    <action android:name="android.intent.action.PICK" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="image/*" />
    <data android:mimeType="vnd.android.cursor.dir/image" />
</intent-filter>

EDYCJA: Oto rozwiązanie w jednej funkcji:

public void finish(Bitmap bitmap) {
    try {
        File folder = new File(Environment.getExternalStorageDirectory() + "/Icon Select/");
        if(!folder.exists()) {
            folder.mkdirs();
        }
        File nomediaFile = new File(folder, ".nomedia");
        if(!nomediaFile.exists()) {
            nomediaFile.createNewFile();
        }

        FileOutputStream out = new FileOutputStream(Environment.getExternalStorageDirectory() + "/Icon Select/latest.png");
        bitmap.compress(Bitmap.CompressFormat.PNG, 90, out);
        File bitmapFile = new File(Environment.getExternalStorageDirectory() + "/Icon Select/latest.png");

        if(bitmapFile.exists()) {
            Intent localIntent = new Intent().setData(Uri.fromFile(bitmapFile));
            setResult(RESULT_OK, localIntent);                
        } else {
            setResult(RESULT_CANCELED);
        }
        super.finish();

    } catch (Exception e) {
        e.printStackTrace();
        Log.d("beewhale", "Error writing data");
    }
}

questionAnswers(2)

yourAnswerToTheQuestion