Created
May 29, 2014 11:20
-
-
Save heisvoid/e22d405e2e62b5b06b5f to your computer and use it in GitHub Desktop.
Dump palette data from PCX
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
file_len=`stat -c %s "$1"` | |
pal_ofs=$(($file_len - 768)) | |
dd if="$1" skip=$pal_ofs ibs=1 bs=1 count=768 |
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
for f in $* | |
do | |
file_len=`stat -c %s "$f"` | |
pal_ofs=$(($file_len - 768)) | |
out_name=`basename "$f"` | |
out_name="$out_name.pal" | |
dd if="$f" of="$out_name" skip=$pal_ofs ibs=1 obs=1 bs=1 count=768 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment