会看到一个 make-image-header.sh 的脚本,等下会使用这个脚本来将图片转化成头文件。
3.在使用脚本之前,需要安装库,否则会报错。
forlinx@ubuntu:~/psplash$ sudo apt-get install libgdk-pixbuf2.0-dev [sudo] password for forlinx: Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: linux-hwe-5.4-headers-5.4.0-84 Use 'sudo apt autoremove' to remove it. 【…】 forlinx@ubuntu:~/psplash$ sudo apt-get install build-essential libncurses5-dev Reading package lists... Done Building dependency tree Reading state information... Done 【…】
4.将想要替换的图片复制到psplash文件夹中,此处用的是我们公司的**,命名为**-1024x600.png ,外框照片命名为**-bar.png。
进度条的外框 **-bar.png。
将这两张图片拷贝到 psplash 源码目录中,如下图所示。
二 制作**
1.在 psplash 源码中执行以下指令来生成 **-1024x600-img.h
可以看到它必须是要加 POKY 参数的,因为其他地方要用到这样的宏定义。
2.返回到 psplash 源码下,执行以下指令生成 **-bar-img.h
forlinx@ubuntu:~/psplash$ ./make-image-header.sh **-bar.png BAR forlinx@ubuntu:~/psplash$ ls
同样我们打开 **-bar-img.h 这个文件。它必须是加 BAR 参数的,因为其他地方会 用到这样的宏定义。
forlinx@ubuntu:~/psplash$ vi **-bar-img.h