如何给png图片描边

shankemomo 2012-08-13 09:47:48
如何给一个png图片的不透明部分描边?
...全文
1233 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
shankemomo 2012-08-14
  • 打赏
  • 举报
回复
[Quote=引用楼主 的回复:]
如何给一个png图片的不透明部分描边?
[/Quote]
大家都理解错了啊。我是想给png的不透明部分描边啊,不是边框。。。。就和PS中的描边是一个意思啊
来到我身边 2012-08-13
  • 打赏
  • 举报
回复
可以试试属性:margin
a5864131452 2012-08-13
  • 打赏
  • 举报
回复
我觉得,如果仅仅是死边,也就是不需要动的边.那么还是从ps里面直接加进去好了.

要是光标.会移动的边,在ps里面弄个光标的图片好.

如果能用ps能解决的就不要用代码.
coxfilur_2008 2012-08-13
  • 打赏
  • 举报
回复
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.

80,493

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧