OK335xS psplash make-image-header.sh hacking

简介: /***************************************************************************** * OK335xS psplash make-image-header.sh hacking * 说明: * 移植的时候想知道移植psplash中./make-image-header.sh Screenshot.png POKY * 最后的POKY为什么要指定,觉得只要解读这份代码就能知道为什么了。
/*****************************************************************************
 *           OK335xS psplash make-image-header.sh hacking
 * 说明:
 *     移植的时候想知道移植psplash中./make-image-header.sh Screenshot.png POKY
 * 最后的POKY为什么要指定,觉得只要解读这份代码就能知道为什么了。
 *
 *                                    2016-4-18 深圳 南山平山村 曾剑锋
 ****************************************************************************/


#!/bin/sh
# -e 如果命令带非零值返回,立即退出
set -e

# 1. 语法
#     basename String [ Suffix ]
# 2. 由这里可知,图片要是.png的文件
imageh=`basename $1 .png`-img.h
# 这里是用于后续修改的变量名
name="${2}_IMG"             
# 产生文件
gdk-pixbuf-csource --macros $1 > $imageh.tmp
# 修改文件内容
sed -e "s/MY_PIXBUF/${name}/g" -e "s/guint8/uint8/g" $imageh.tmp > $imageh && rm $imageh.tmp

 

目录
相关文章
|
Ubuntu Unix Linux
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
编译mate-control-center:error: required directory ./help does not exist
编译mate-control-center:error: required directory ./help does not exist
83 0
|
Linux C语言 C++
make 命令出现:"make:*** No targets specified and no makefile found.Stop."
make 命令出现:"make:*** No targets specified and no makefile found.Stop."
852 0
|
Linux 异构计算
成功解决./nvidia-installer: invalid option: "‐‐no‐opengl‐files" ERROR: Invalid commandline, please run `
成功解决./nvidia-installer: invalid option: "‐‐no‐opengl‐files" ERROR: Invalid commandline, please run `
SAP WM RF LM05 Source Storage Bin & Material Code Validation
TO#2581455     LM05,     假定我们扫错了source storage bin, J00BJ7501 而不是TO上的J00BJ7500, 回车,   系统自动做了验证,并报错,如上图。
1139 0
|
XML 前端开发 Shell
I.MX6 Manufacturing Tool V2 (MFGTool2) Update Command List (UCL) User Guide translate
  Manufacturing Tool V2 (MFGTool2)    Update Command List (UCL) User Guide                       Contents(目录)         Contents(目录)             ...
1075 0