Last active
May 17, 2022 10:47
-
-
Save Umbrien/291c0c16d95c3eb934289aad9e7751f0 to your computer and use it in GitHub Desktop.
Remove watermark for generated nft collection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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