aboutsummaryrefslogtreecommitdiffstats
path: root/make-image-header.sh
blob: d1c184c197592ffbb8ab651387b8960cf81892b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-or-later
#

set -e

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