简体   繁体   English

在Imageview中去除图像周围的白色

[英]Remove the white color around the image in Imageview

I have a image http://i.stack.imgur.com/mFJpO.jpg when I add in my project it appears like this http://i.stack.imgur.com/CcD2g.png but I want to remove the white color of the image and want to show the background.I need only the elephant in the image to be show and remove the white borders and make the layout background to be shown is there any way I can do it. 在我添加到项目中时,我有一个图像http://i.stack.imgur.com/mFJpO.jpg ,它看起来像这样http://i.stack.imgur.com/CcD2g.png但我想删除我只需要显示图像中的大象,并删除白色边框并显示要显示的布局背景,我有什么办法可以做到这一点。

<RelativeLayout 
    android:id="@+id/Head"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_margin="5dp"
    android:layout_weight="70" 
    android:orientation="vertical"
    android:background="@drawable/jungle">

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="40dp"
            android:adjustViewBounds="true"
            android:scaleType="center"
            android:src="@drawable/elephant" />

 </RelativeLayout>

Use Photoshop instead. 请改用Photoshop。

  1. Open it on Photoshop. 在Photoshop上打开它。
  2. Remove / Delete the White Layer. 删除/删除白色图层。
  3. Last, Save it as PNG Format. 最后,将其另存为PNG格式。

:) :)

This you can not do by android. 这是您无法通过android执行的操作。 You have to use some different tools like Photoshop or Coral etc to create transparent image (may be .png) file. 您必须使用Photoshop或Coral等其他工具来创建透明图像(可能是.png)文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM