Tweak sponsor image handling
authorchris ellis <chris@intrbiz.com>
Tue, 2 Apr 2024 01:45:35 +0000 (02:45 +0100)
committerchris ellis <chris@intrbiz.com>
Tue, 2 Apr 2024 01:45:35 +0000 (02:45 +0100)
static/img/ogp/sponsor-interview-amazon-web-services.png
static/img/ogp/sponsor-interview-dbtune.png
static/img/ogp/sponsor-interview-fujitsu-enterprise-postgres.png
static/img/ogp/sponsor-interview-gitc-pro-limited.png
static/img/ogp/sponsor-interview-proopensource-ou.png
static/img/ogp/sponsor-interview-quest.png
static/img/ogp/src/build.sh
static/img/ogp/src/ogp-interview.svg

index 579065d256b8ab111e812037adc2b98b940e0a7b..bf2fa46483b07771524fed65075f8319ef6cb023 100644 (file)
Binary files a/static/img/ogp/sponsor-interview-amazon-web-services.png and b/static/img/ogp/sponsor-interview-amazon-web-services.png differ
index 6bca5548fb89f8f584d7f5a4d86bcfceb5cad75e..5ce273142c58bcefa1ec82a4bb8c419a6d6a1cff 100644 (file)
Binary files a/static/img/ogp/sponsor-interview-dbtune.png and b/static/img/ogp/sponsor-interview-dbtune.png differ
index f07eb4be9e5f35fc015307b589a276e9765ef8b1..21b72a06bb205f80d1e9f265b37009137931a5d0 100644 (file)
Binary files a/static/img/ogp/sponsor-interview-fujitsu-enterprise-postgres.png and b/static/img/ogp/sponsor-interview-fujitsu-enterprise-postgres.png differ
index e567f3e14f4aed88072c4d76e26530367c7ca9ba..c91b5d9f0062ea0ecd5bf8aa61fa52b426a52057 100644 (file)
Binary files a/static/img/ogp/sponsor-interview-gitc-pro-limited.png and b/static/img/ogp/sponsor-interview-gitc-pro-limited.png differ
index 1b7d1f8dea31ff16f80ba383e0dc04d5766ab656..ebccec89755e2046204d498241f9733d06fb9a17 100644 (file)
Binary files a/static/img/ogp/sponsor-interview-proopensource-ou.png and b/static/img/ogp/sponsor-interview-proopensource-ou.png differ
index 169838f4af0fc4c934764dd8b50105dc73899336..34abc08a20817bc34ace96dac7197f38d02dcaba 100644 (file)
Binary files a/static/img/ogp/sponsor-interview-quest.png and b/static/img/ogp/sponsor-interview-quest.png differ
index 57ab56409f7d7cc1741f80cf7bf6da777361b6a6..99b623f4b1ac17b3a31de2a87933046094a29724 100755 (executable)
@@ -10,12 +10,16 @@ cat sponsors.lst | grep -v '#' | while read SPONSOR; do
     SPONSOR_NAME=$(echo $SPONSOR | cut -d ':' -f 1)
     SPONSOR_URL=$(echo $SPONSOR | cut -d ':' -f 2)
     SPONSOR_IMG=$(echo $SPONSOR | cut -d ':' -f 3)
-    echo "Generating head image for sponsor $SPONSOR_NAME with image $SPONSOR_IMG and URL $SPONSOR_URL"
+    SPONSOR_IMG_W=$(magick identify -format "%[fx:w]" "../../logos/$SPONSOR_IMG")
+    SPONSOR_IMG_H=$(magick identify -format "%[fx:h]" "../../logos/$SPONSOR_IMG")
+    echo "Generating head image for sponsor $SPONSOR_NAME with image $SPONSOR_IMG (${SPONSOR_IMG_W}x${SPONSOR_IMG_H}) and URL $SPONSOR_URL"
     cp "./ogp-interview.svg" "./ogp-interview-${SPONSOR_URL}.svg"
+    convert "../../logos/$SPONSOR_IMG" -resize 550x120 -background white -compose Copy -gravity center -extent 550x120 "./$SPONSOR_IMG"
     sed -i "s|LOGO.png|$SPONSOR_IMG|" "./ogp-interview-${SPONSOR_URL}.svg"
     sed -i "s|PAGE_URL|sponsor-interviews/$SPONSOR_URL/|" "./ogp-interview-${SPONSOR_URL}.svg"
     inkscape --export-type="png"  --export-area-page --export-filename "../sponsor-interview-${SPONSOR_URL}.png" "./ogp-interview-${SPONSOR_URL}.svg"
     rm "./ogp-interview-${SPONSOR_URL}.svg"
+    rm "./$SPONSOR_IMG"
 done
 
 # Pages
index f93364b5a04a2d6b11811529b239cc4ad6d4f326..72011585fd4300c982a481c84875eaf978b77f70 100644 (file)
      height="120"
      image-rendering="optimizeQuality"
      stroke-width="0.194169"
-     xlink:href="../../logos/LOGO.png"
-     preserveAspectRatio="xMidYMid meet"
+     xlink:href="LOGO.png"
+     preserveAspectRatio="none"
      id="image77" /></svg>