Skip to content

Instantly share code, notes, and snippets.

@Umbrien
Last active May 17, 2022 10:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Umbrien/291c0c16d95c3eb934289aad9e7751f0 to your computer and use it in GitHub Desktop.
Save Umbrien/291c0c16d95c3eb934289aad9e7751f0 to your computer and use it in GitHub Desktop.
Remove watermark for generated nft collection
#!/bin/bash
# Usage: ./removewater.sh <collection_name>.zip
# watermark bounds
water_x=330
water_y=160
unzip $1 -d /tmp/nft-collection
for img in /tmp/nft-collection/collection/assets/*
do
convert $img \
-fill black -draw "rectangle 0,0 $water_x,$water_y" -alpha off \
-fill none -draw "matte 0,0 floodfill" \
$img
done
zip waterless-$1 /tmp/nft-collection/collection/assets/*
rm -rf /tmp/nft-collection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment