Skip to content

Instantly share code, notes, and snippets.

@nihirash
Last active February 26, 2022 22:58
Show Gist options
  • Select an option

  • Save nihirash/8c36680992f6b13811a316758fb34e17 to your computer and use it in GitHub Desktop.

Select an option

Save nihirash/8c36680992f6b13811a316758fb34e17 to your computer and use it in GitHub Desktop.
Convert any image to DXT1 texture(for Apollo V4 computers). Requires imagemagick installed.
#!/bin/bash
if [ $# -ne 2 ]
then
echo "Usage: img2dxt1 <source-image> <output-name>"
exit 1
fi
if [ ! -f "$1" ]
then
echo "Input file does not exists!"
exit 1
fi
convert "$1" -resize "256x256!" -depth 8 -define dds:compression=dxt1 DXT1:"$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment