summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanley Chery <nanley.g.chery@intel.com>2015-06-05 09:11:24 -0700
committerNanley Chery <nanley.g.chery@intel.com>2015-06-05 10:13:07 -0700
commit69ea30e325fb009a4ea026e836c273d545ce783b (patch)
treef72e36c89611deb329c8ff8171e6abbeec61adc3
parent5dff760ef19d545e7e1b7ec227acba73b0a7f00c (diff)
use png as the source image
-rw-r--r--Makefile2
-rwxr-xr-xmake_ktxes.sh6
-rw-r--r--waffles.pngbin0 -> 204158 bytes
3 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 6a8c1d5..2c2cf39 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ default: gen_mipmaps.c fix_mali_ktx.c gen_ktx.c
gcc -g gen_ktx.c -o gen_ktx -lktx
ktxes:
- ./make_ktxes.sh waffles.jpg
+ ./make_ktxes.sh waffles.png
test:
ninja -C ~/repos/piglit2
diff --git a/make_ktxes.sh b/make_ktxes.sh
index a0942fd..14d8913 100755
--- a/make_ktxes.sh
+++ b/make_ktxes.sh
@@ -129,7 +129,7 @@ img_h=`identify -format "%[fx:h]" $1`
for lod in $(seq 0 $MAX_LEVEL); do
# Resize the image for current level of detail (LOD).
- convert ${inFileHead}.jpg"[${img_w}x${img_h}!]" ${inFileHead}-${lod}.jpg
+ convert -define png:preserve-colormap=true ${inFileHead}.png"[${img_w}x${img_h}!]" ${inFileHead}-${lod}.png
# Stop generating miplevels when reaching dimensions 1x1.
echo "LOD-$lod dimensions are: ${img_w}x${img_h}"
@@ -189,7 +189,7 @@ for i in ${Fmt[@]}; do
for lod in $(seq 0 $MAX_LEVEL); do
# Choose the right base file
- inFile=${inFileHead}-${lod}.jpg
+ inFile=${inFileHead}-${lod}.png
# Setup output files
outFile=${outFileHead}-$lod
@@ -250,5 +250,5 @@ done
# Delete each level of detail
for lod in $(seq 0 $MAX_LEVEL); do
- rm ${inFileHead}-${lod}.jpg
+ rm ${inFileHead}-${lod}.png
done
diff --git a/waffles.png b/waffles.png
new file mode 100644
index 0000000..e9cdbce
--- /dev/null
+++ b/waffles.png
Binary files differ