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

 

目录
打赏
0
0
0
0
12
分享
相关文章
|
10月前
MTK在编译10A的target时报错:make: *** [mmi_feature_check]
MTK在编译10A的target时报错:make: *** [mmi_feature_check]
44 0
Linux(14)Debain Make image and module configuration instructions
Linux(14)Debain Make image and module configuration instructions
45 0
Could not enumerate video devices (or none found).解决办法
Could not enumerate video devices (or none found).解决办法
130 0
wrf--运行real.exe时报错:“Could not find level above ground“ error
在修改wrf初始场资料时,如果做了带通滤波处理,会发现在运行real.exe时报错:“Could not find level above ground” error 。
wrf--运行real.exe时报错:“Could not find level above ground“ error
编译OpenJDK8-u332:/bin/sh: 1: [: -a: unexpected operator/line 0: [: too many arguments
编译OpenJDK8-u332:/bin/sh: 1: [: -a: unexpected operator/line 0: [: too many arguments
188 0
MAC编译lame ld: symbol(s) not found for architecture x86_64/_lame_init_old“, referenced from
MAC编译lame ld: symbol(s) not found for architecture x86_64/_lame_init_old“, referenced from
314 0
make 命令出现:"make:*** No targets specified and no makefile found.Stop."
make 命令出现:"make:*** No targets specified and no makefile found.Stop."
1159 0
yolov5--从Github下载到运行遇到的错误集锦【pycocotools报错+Can‘t get attribute SPPF+in _next_assert img0 is not None】
yolov5--从Github下载到运行遇到的错误集锦【pycocotools报错+Can‘t get attribute SPPF+in _next_assert img0 is not None】
553 0
yolov5--从Github下载到运行遇到的错误集锦【pycocotools报错+Can‘t get attribute SPPF+in _next_assert img0 is not None】
HDOJ 1094 A+B for Input-Output Practice (VI)
HDOJ 1094 A+B for Input-Output Practice (VI)
120 0
pt-tools系统:pt-kill 实战
列出几种常用场景,并进行分析实战测试 特殊、 打印出执行时间超过3秒的connection,仅仅打印,不kill 每2秒循环一次,超过10秒就退出pt-kill程序pt-kill --host xx.
1479 0
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等