generate-screenshot-product-images.sh (5696B)
1 #!/usr/bin/env bash 2 3 set -euo pipefail 4 5 SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" 6 ASSET_DIR="$SCRIPT_DIR/../src/debug/assets/screenshot-products" 7 FONT_PATH="/System/Library/Fonts/Supplemental/Arial Bold.ttf" 8 mkdir -p "$ASSET_DIR" 9 10 magick -size 640x640 xc:'#f3e8d2' \ 11 -fill '#6b3f2c' -draw 'roundrectangle 170,180 470,500 42,42' \ 12 -fill '#f8f4ec' -draw 'ellipse 320,250 88,44 0,360' \ 13 -fill '#dcc7ae' -draw 'ellipse 320,250 70,30 0,360' \ 14 -fill '#6b3f2c' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Coffee' \ 15 "$ASSET_DIR/coffee.png" 16 17 magick -size 640x640 xc:'#dff1e2' \ 18 -fill '#72a96c' -draw 'polygon 320,150 430,350 210,350' \ 19 -fill '#c7e0a8' -draw 'polygon 320,210 390,330 250,330' \ 20 -fill '#3c6b48' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Tea' \ 21 "$ASSET_DIR/tea.png" 22 23 magick -size 640x640 xc:'#fff4d8' \ 24 -fill '#f2c84b' -draw 'roundrectangle 220,150 420,455 38,38' \ 25 -fill '#fff9df' -draw 'rectangle 245,190 395,230' \ 26 -fill '#df8f2d' -draw 'circle 320,300 370,300' \ 27 -fill '#815c13' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Juice' \ 28 "$ASSET_DIR/juice.png" 29 30 magick -size 640x640 xc:'#ead8c8' \ 31 -fill '#ffffff' -draw 'roundrectangle 230,180 410,430 22,22' \ 32 -fill '#3b2118' -draw 'ellipse 320,250 72,42 0,360' \ 33 -fill '#6b3f2c' -draw 'ellipse 320,255 54,28 0,360' \ 34 -fill '#5a3224' -gravity south -font "$FONT_PATH" -pointsize 50 -annotate +0+48 'Espresso' \ 35 "$ASSET_DIR/espresso.png" 36 37 magick -size 640x640 xc:'#fff1c9' \ 38 -fill '#f5d34f' -draw 'roundrectangle 210,165 430,455 44,44' \ 39 -fill '#fff8d8' -draw 'rectangle 240,210 400,250' \ 40 -fill '#77a556' -draw 'line 360,150 320,210' \ 41 -fill '#7a6415' -gravity south -font "$FONT_PATH" -pointsize 48 -annotate +0+48 'Lemonade' \ 42 "$ASSET_DIR/lemonade.png" 43 44 magick -size 640x640 xc:'#f6e7d7' \ 45 -fill '#c8843b' -draw 'path \"M 150,360 Q 320,120 490,360 Q 320,470 150,360 z\"' \ 46 -fill '#e3ad62' -draw 'path \"M 210,335 Q 320,190 430,335 Q 320,405 210,335 z\"' \ 47 -fill '#80511f' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Croissant' \ 48 "$ASSET_DIR/croissant.png" 49 50 magick -size 640x640 xc:'#efe2f2' \ 51 -fill '#c18a43' -draw 'circle 320,305 455,305' \ 52 -fill '#e5bd77' -draw 'circle 320,285 420,285' \ 53 -fill '#4a65a4' -draw 'circle 270,250 288,250' \ 54 -fill '#4a65a4' -draw 'circle 350,275 370,275' \ 55 -fill '#6a3b79' -gravity south -font "$FONT_PATH" -pointsize 52 -annotate +0+48 'Muffin' \ 56 "$ASSET_DIR/muffin.png" 57 58 magick -size 640x640 xc:'#f1e0c9' \ 59 -fill '#b87938' -draw 'ellipse 320,300 170,120 0,360' \ 60 -fill '#f5d7a6' -draw 'ellipse 320,300 80,55 0,360' \ 61 -fill '#f9f0df' -draw 'ellipse 320,300 52,34 0,360' \ 62 -fill '#73502a' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Bagel' \ 63 "$ASSET_DIR/bagel.png" 64 65 magick -size 640x640 xc:'#efe7dc' \ 66 -fill '#c9914e' -draw 'roundrectangle 140,210 500,450 36,36' \ 67 -fill '#7ebc6f' -draw 'roundrectangle 165,250 475,300 25,25' \ 68 -fill '#d94b46' -draw 'roundrectangle 165,305 475,340 20,20' \ 69 -fill '#f4deb2' -draw 'roundrectangle 165,345 475,410 24,24' \ 70 -fill '#70491e' -gravity south -font "$FONT_PATH" -pointsize 50 -annotate +0+48 'Sandwich' \ 71 "$ASSET_DIR/sandwich.png" 72 73 magick -size 640x640 xc:'#eee5d7' \ 74 -fill '#d6b070' -draw 'polygon 230,170 440,250 360,455 170,380' \ 75 -fill '#87b96d' -draw 'polygon 255,220 400,275 345,390 210,345' \ 76 -fill '#f7e3b7' -draw 'polygon 275,260 380,295 335,360 235,330' \ 77 -fill '#6d4a21' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Wrap' \ 78 "$ASSET_DIR/wrap.png" 79 80 magick -size 640x640 xc:'#e8f4e2' \ 81 -fill '#78aa55' -draw 'ellipse 320,325 180,110 0,360' \ 82 -fill '#b6d26d' -draw 'circle 255,290 282,290' \ 83 -fill '#d86f4a' -draw 'circle 355,310 380,310' \ 84 -fill '#f0d487' -draw 'circle 315,350 340,350' \ 85 -fill '#456d2e' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Salad' \ 86 "$ASSET_DIR/salad.png" 87 88 magick -size 640x640 xc:'#f5e4d4' \ 89 -fill '#e38a34' -draw 'ellipse 320,320 180,95 0,360' \ 90 -fill '#f5b05a' -draw 'ellipse 320,300 140,65 0,360' \ 91 -fill '#f9e4b0' -draw 'circle 270,285 285,285' \ 92 -fill '#8a4a1c' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Soup' \ 93 "$ASSET_DIR/soup.png" 94 95 magick -size 640x640 xc:'#f5ead8' \ 96 -fill '#c88a3d' -draw 'path \"M 190,390 A 150,150 0 0 1 450,240 L 450,390 z\"' \ 97 -fill '#f0d091' -draw 'path \"M 240,365 A 110,110 0 0 1 420,260 L 420,365 z\"' \ 98 -fill '#75a65d' -draw 'circle 335,310 352,310' \ 99 -fill '#82521f' -gravity south -font "$FONT_PATH" -pointsize 52 -annotate +0+48 'Quiche' \ 100 "$ASSET_DIR/quiche.png" 101 102 magick -size 640x640 xc:'#edf2f6' \ 103 -fill '#ffffff' -draw 'roundrectangle 210,170 430,450 36,36' \ 104 -fill '#d7b36a' -draw 'rectangle 235,285 405,405' \ 105 -fill '#c74e58' -draw 'circle 280,250 302,250' \ 106 -fill '#4b6fae' -draw 'circle 345,240 365,240' \ 107 -fill '#49535f' -gravity south -font "$FONT_PATH" -pointsize 50 -annotate +0+48 'Granola' \ 108 "$ASSET_DIR/granola.png" 109 110 magick -size 640x640 xc:'#edf0d8' \ 111 -fill '#cda94e' -draw 'polygon 210,210 370,250 300,430' \ 112 -fill '#dfbf66' -draw 'polygon 315,190 460,285 345,430' \ 113 -fill '#8d7425' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Chips' \ 114 "$ASSET_DIR/chips.png" 115 116 magick -size 640x640 xc:'#f1edf6' \ 117 -fill '#ffffff' -draw 'roundrectangle 220,170 420,450 36,36' \ 118 -fill '#f0c158' -draw 'circle 285,275 315,275' \ 119 -fill '#d95b5b' -draw 'circle 350,275 378,275' \ 120 -fill '#79a85f' -draw 'circle 320,340 350,340' \ 121 -fill '#5c5570' -gravity south -font "$FONT_PATH" -pointsize 54 -annotate +0+48 'Fruit' \ 122 "$ASSET_DIR/fruit.png"