【android】解码.9图片及xml
来源:互联网 发布:华为大数据开发工程师 编辑:程序博客网 时间:2024/05/21 22:54
原文地址:http://blog.csdn.net/cc_want/article/details/51381099
1.前言
在公司项目开发中,往往遇到需要一些图片资源来对android界面进行美化,然而有些时候,小公司没有美工怎么办?so easy.下载现成apk,解压res资源,然后发现,图片被编译了?没关系,接下来我们来编写程序解密.9图片
解密后
2.实现
首先从下面附件中下载apktool.jar包,对于apktool我们就不用多说了,接下来在eclipse新建java工程,导入apktool.jar,创建java类,编写方法
public void decode9path(File inFile,File outfile){try {InputStream in=new FileInputStream(inFile);OutputStream out=new FileOutputStream(outfile);Res9patchStreamDecoder de=new Res9patchStreamDecoder();de.decode(in, out);} catch (Exception e) {e.printStackTrace();}}
对的,这就是解密.9图片的方法,具体实现请看brut.androlib.res.decoder.Res9patchStreamDecoder这里就不多说了
接下来是解密raw资源的方法
public void decodeRaw(File inFile,File outfile){try {InputStream in=new FileInputStream(inFile);OutputStream out=new FileOutputStream(outfile);ResRawStreamDecoder rrsd=new ResRawStreamDecoder();rrsd.decode(in, out);} catch (Exception e) {e.printStackTrace();}}
3.附件
http://download.csdn.net/detail/cc_want/9517501
0 0
- 【android】解码.9图片及xml
- android 图片解码 质量问题
- android webkit 图片解码
- android 图片解码显示流程
- Android图片解码分辨率问题
- android图片编解码architecture
- Android Base64图片的解码
- Android的程序解码与XML文件解码
- Android使用FFMPEG解码成PPM图片
- android JNI解码内存中的JPEG图片
- Android jp2(jpeg2000)图片的解码显示
- Android兼容性问题 -- WebP格式图片解码失败
- Android gif图片的解码与合成
- Android jp2(jpeg2000)图片的解码显示
- MTK图片解码流程及png图片详解
- MTK图片解码流程及png图片详解
- MTK图片解码流程及png图片详解
- MTK图片解码流程及png图片详解
- eerTyraniBafonoitazilaireSredroerPyfireV.331
- Permutation I
- centos装aptget
- 基于腾讯云的Centos6系统搭建Apache+Mysql+PHP开发环境
- JS原型与原型链终极详解
- 【android】解码.9图片及xml
- 【JDK】:Java容器框架
- hdu 1736 水
- 对称加密
- 那些被漏掉的JQuery总结(一)——Window.Onload和document.ready的对比(补充Page_load)
- JSONModel解析Dictionary To Model ,JSON到Model
- Java web系列----JDBC
- Android中的动画过程
- 小知识