Hello.
Thanks for your solution. I used it for extracting weapon icons for my pet project.
Unfortunaly, I didn't figure out how to match icon id with weapon_id or something simmilar. But I founded that SWF contains original names and it can be parsed from swfdump -u iconlib.swf output. For example:
$ swfdump -u iconlib.swf | grep exports | grep icon | grep ak47
exports 0196 as "icon-ak47_grey.png"
exports 0197 as "icon-ak47.png"
exports 0304 as "icon-ak47"
exports 0569 as "outline-icon-ak47"
I've created a shell script, which renames extracted files to its original name. Here it is:
#!/bin/bash
IFS='
'
for line in $(swfdump -u iconlib.swf | grep exports); do
id=$(echo $line | awk '{print$2}' | sed -e 's/^[0]*//')
name=$(echo $line | awk '{print$4}' | sed -e 's/"//g')
if [[ -f csgo-icons/$id.png ]]; then
mv csgo-icons/$id.png csgo-icons/$name
fi
done
It hardcodes file format to png (actually all images appears to be png, even with jpg extenstion), but it solved my problem. Maybe it would be usefull for improvement of your programm.
Hello.
Thanks for your solution. I used it for extracting weapon icons for my pet project.
Unfortunaly, I didn't figure out how to match icon id with weapon_id or something simmilar. But I founded that SWF contains original names and it can be parsed from
swfdump -u iconlib.swfoutput. For example:I've created a shell script, which renames extracted files to its original name. Here it is:
It hardcodes file format to png (actually all images appears to be png, even with jpg extenstion), but it solved my problem. Maybe it would be usefull for improvement of your programm.