annotate tools/create-screenshot-for-doc @ 6264:3eae40f95cc3

qt5: update to v5.15.5 * src/qtbase.mk: update version, checksum * src/qtimageformats.mk, src/qtsvg.mk, src/qttools.mk, src/qttranslations.mk: update checksum * src/qtbase-2-gcc11.patch: deleted * dist-files.mk: remove ref to deleted file
author John Donoghue <john.donoghue@ieee.org>
date Mon, 20 Jun 2022 07:36:53 -0400
parents 14b3f5ea78ae
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2358
14b3f5ea78ae Cleanup coding style via "make cleanup-style"
Volker Grabsch <vog@notjusthosting.com>
parents: 2176
diff changeset
1 #!/usr/bin/env bash
2176
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
2 set -eu
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
3
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 if [ "$#" -ne 2 ]; then
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 echo
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
6 echo "Syntax: $0 [IMAGE.png] [NAME]"
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
7 echo
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
8 echo 'IMAGE.png -> screenshot-NAME.png + screenshot-NAME-small.png'
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
9 echo
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
10 exit 1
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11 fi
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
12
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
13 set -v
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
14
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15 IMAGE_FILE="$1"
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
16 NAME="$2"
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
17
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
18 cat "$IMAGE_FILE" \
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
19 | pngtopnm \
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
20 | pnmtopng -compression 9 \
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
21 > "screenshot-$NAME.png"
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
22
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
23 cat "screenshot-$NAME.png" \
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
24 | pngtopnm \
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
25 | pnmscale -ysize 128 \
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
26 > "screenshot-$NAME-small.pnm"
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
27
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
28 pnmquant 256 "screenshot-$NAME-small.pnm" \
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
29 | pnmtopng -compression 9 \
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
30 > "screenshot-$NAME-small.png"
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
31
4e68de2de908 Added the script which has been used to compress screenshots and to create thumbnails (*-small.png) for doc/
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
32 rm -f "screenshot-$NAME-small.pnm"