Created
January 14, 2022 06:54
-
-
Save Fuwn/a46805a8bb0ec70dd122a43a434251f6 to your computer and use it in GitHub Desktop.
Image to BMP3 Converter for Worlds
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
# Check if a filename was supplied | |
if ! test -n "${1}"; | |
then | |
echo "bmp-to-bmp3.sh <file.bmp>" | |
exit 1 | |
fi | |
# Check if ImageMagick is installed | |
if ! command -v mogrify &> /dev/null; | |
then | |
echo "ImageMagick not found" | |
exit 1 | |
fi | |
mogrify -format BMP3 ${1} # file.bmp to file.BMP3 | |
mv ${1}3 ${1} # Rename file.BMP3 to file.bmp | |
convert -type truecolor ${1} # Convert to 24-bit bit depth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment