diff --git a/store-assets/screenshots/tablet-10in/01-roots.png b/store-assets/screenshots/tablet-10in/01-roots.png new file mode 100644 index 0000000..de0c161 Binary files /dev/null and b/store-assets/screenshots/tablet-10in/01-roots.png differ diff --git a/store-assets/screenshots/tablet-10in/02-folder-list.png b/store-assets/screenshots/tablet-10in/02-folder-list.png new file mode 100644 index 0000000..ab5f2e5 Binary files /dev/null and b/store-assets/screenshots/tablet-10in/02-folder-list.png differ diff --git a/store-assets/screenshots/tablet-10in/03-photos-thumbnails.png b/store-assets/screenshots/tablet-10in/03-photos-thumbnails.png new file mode 100644 index 0000000..574a3dd Binary files /dev/null and b/store-assets/screenshots/tablet-10in/03-photos-thumbnails.png differ diff --git a/store-assets/screenshots/tablet-10in/04-storage-usage.png b/store-assets/screenshots/tablet-10in/04-storage-usage.png new file mode 100644 index 0000000..684e2c9 Binary files /dev/null and b/store-assets/screenshots/tablet-10in/04-storage-usage.png differ diff --git a/store-assets/screenshots/tablet-7in/01-roots.png b/store-assets/screenshots/tablet-7in/01-roots.png index 34d5589..f0e6d86 100644 Binary files a/store-assets/screenshots/tablet-7in/01-roots.png and b/store-assets/screenshots/tablet-7in/01-roots.png differ diff --git a/store-assets/screenshots/tablet-7in/02-folder-list.png b/store-assets/screenshots/tablet-7in/02-folder-list.png index bb89305..68068e1 100644 Binary files a/store-assets/screenshots/tablet-7in/02-folder-list.png and b/store-assets/screenshots/tablet-7in/02-folder-list.png differ diff --git a/store-assets/screenshots/tablet-7in/03-photos-thumbnails.png b/store-assets/screenshots/tablet-7in/03-photos-thumbnails.png index c9caff3..78de11f 100644 Binary files a/store-assets/screenshots/tablet-7in/03-photos-thumbnails.png and b/store-assets/screenshots/tablet-7in/03-photos-thumbnails.png differ diff --git a/store-assets/screenshots/tablet-7in/04-storage-usage.png b/store-assets/screenshots/tablet-7in/04-storage-usage.png index e4a9b7b..fbaa7d4 100644 Binary files a/store-assets/screenshots/tablet-7in/04-storage-usage.png and b/store-assets/screenshots/tablet-7in/04-storage-usage.png differ diff --git a/tools/make-store-screenshots.sh b/tools/make-store-screenshots.sh index 317712d..6b15b83 100755 --- a/tools/make-store-screenshots.sh +++ b/tools/make-store-screenshots.sh @@ -34,6 +34,15 @@ esac status_px="${STATUS_BAR_PX:-$default_status}" nav_px="${NAV_BAR_PX:-$default_nav}" +# A headless AVD whose display has slept, or an app whose first frame has not composed yet, +# produces a screencap of pure background. The top and bottom system bars are still drawn, +# so the file is not *obviously* empty — but the app area has no ink at all. That is +# invisible in a thumbnail and unacceptable on a listing, so each capture is measured +# before it is normalised. `sample_inset` shaves the top and bottom margin (where the +# system bars sit on every profile here) so the measurement covers app content only. +blank_threshold="${BLANK_THRESHOLD:-0.005}" +sample_inset=150 + raw="$repo/store-assets/raw-screenshots/$form" out="$repo/store-assets/screenshots/$form" mkdir -p "$out" @@ -47,8 +56,18 @@ if [ ${#captures[@]} -eq 0 ]; then fi echo "Normalising ${#captures[@]} capture(s) from $raw -> $out" +blanks=0 for capture in "${captures[@]}"; do name="$(basename "$capture")" + + content_stddev="$(magick "$capture" -shave 0x"$sample_inset" \ + -colorspace gray -format '%[fx:standard_deviation]' info:)" + if awk -v s="$content_stddev" -v t="$blank_threshold" 'BEGIN { exit !(s < t) }'; then + printf ' %s BLANK (content stddev %s) — not normalised\n' "$name" "$content_stddev" >&2 + blanks=$((blanks + 1)) + continue + fi + magick "$capture" \ -gravity North -chop 0x"$status_px" \ -gravity South -chop 0x"$nav_px" \ @@ -60,4 +79,12 @@ for capture in "${captures[@]}"; do magick identify -format '%wx%h %[channels] %b\n' "$out/$name" done +if [ "$blanks" -gt 0 ]; then + echo "ERROR: $blanks capture(s) were blank and are missing from $out." >&2 + echo " Wake the display and wait for the app's first frame, then re-capture:" >&2 + echo " adb shell svc power stayon true" >&2 + echo " adb shell input keyevent KEYCODE_WAKEUP" >&2 + exit 1 +fi + echo "Done."