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
Ubuntu :relocation R_X86_64_32 against `.rodata‘ can not be used when making a PIE object;
Ubuntu :relocation R_X86_64_32 against `.rodata‘ can not be used when making a PIE object;
3101 0
Ubuntu :relocation R_X86_64_32 against `.rodata‘ can not be used when making a PIE object;
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
254 0
add file in debian/source/include-binaries if you want to store the modified binary in the debian
add file in debian/source/include-binaries if you want to store the modified binary in the debian
395 0
./configure: line 4850: ` XIPH_PATH_OGG(, as_fn_error $? "'
./configure: line 4850: ` XIPH_PATH_OGG(, as_fn_error $? "'
80 0
That command depends on command in Target 'XXX': script phase “[CP] Copy Pods Resourc 报错解决方法
That command depends on command in Target 'XXX': script phase “[CP] Copy Pods Resourc 报错解决方法
181 0
Tutorial: Generate BBox or Rectangle to locate the target obejct
Tutorial: Generate BBox or Rectangle to locate the target obejct      1 clc;close all;clear all; 2 Img=imread('/home/wangxiao/Documents/files/Vis...
glance image-create --name "linux-core-mini-01" --file /cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --progress --visibili
glance image-create --name "linux-core-mini-01" --file /cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --progress --visibil...
1027 0