this is my xml file:
    <RelativeLayout
    android:id="@+id/relativeLayoutTemplateMain"
    android:layout_width="match_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/LinearLayouttools"
    android:layout_above="@+id/lltexttools"
    android:layout_gravity="center">
    <FrameLayout
        android:id="@+id/frame"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:layout_centerInParent="true">
        <ImageView
            android:id="@+id/imageView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:scaleType="centerInside" />
    </FrameLayout>
</RelativeLayout>
i capture framelayout with this code:
fOut = new FileOutputStream(file);
framelayout.setDrawingCacheEnabled(true);
Bitmap bitmap = framelayout.getDrawingCache();
bitmap.compress(Bitmap.CompressFormat.jpeg, 100, fOut);
fOut.flush();
fOut.close();
but Around of the picture is black:
http://uupload.ir/files/z8cv_smsbaaz.ir_4.jpg
also when i set scaleType="FitXY":
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="FitXY"/>
image scale(i dont want scale image) how i solve this problem?