如何给一个png图片的不透明部分描边?

解决方案 »

  1.   

    Bitmap yourPng = ...;Bitmap dest = new BitmapFactory(yourPng.getWidth(), yourPng.getHeight(), Config.ARGB_8888);
    Canvas canvas = new Canvas(dest); // with this, dest will be the drawing result.// draw yourPng and the side onto canvas(dest).
    canvas.draw(yourPng);// draw your thing onto canvas.
    ...// Here the dest is want you wanted.
      

  2.   

    我觉得,如果仅仅是死边,也就是不需要动的边.那么还是从ps里面直接加进去好了.要是光标.会移动的边,在ps里面弄个光标的图片好.如果能用ps能解决的就不要用代码.
      

  3.   

    大家都理解错了啊。我是想给png的不透明部分描边啊,不是边框。就和PS中的描边是一个意思啊