Add a script to add the status bar to the screenshots

The ones generated by the flutter driver do not have status bars
This commit is contained in:
Vishesh Handa
2019-02-16 10:19:28 +01:00
parent 06adf4c3b9
commit 892a575227
2 changed files with 20 additions and 0 deletions

20
scripts/finalize_screenshots.sh Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
#
# This script adds the status bar on top of all the images
# It is required as flutter driver screenshot does not include the status bar
#
set -eu
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$SCRIPT_DIR/.."
DIR_NAME='./screenshots'
cd $DIR_NAME
for i in *.png; do
FILE_NAME=$(basename "${i}" .png)_final.jpg
echo "Converting $i -> $FILE_NAME"
convert "${i}" "$SCRIPT_DIR/status_bar.png" -composite "${FILE_NAME}"
done

BIN
scripts/status_bar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB