使用xxd命令把png图片转成c语言使用的数组

#!/bin/bash

image_list=$(ls *.png)

for imag in ${image_list}
do
    if test -f $imag
    then
        xxd -i  ${imag} >> test.h
    fi
done

参考:http://www.cnblogs.com/killkill/archive/2010/06/23/1763785.html

posted on 2014-07-16 10:08  K's Blog  阅读(973)  评论(0编辑  收藏  举报

导航