[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swftools-common] swfextract file naming
From: |
mechcommanderrei |
Subject: |
[Swftools-common] swfextract file naming |
Date: |
Fri, 19 Jan 2007 04:59:48 -0000 |
Hi,
Currently, swfextract always names its output files "output" (ex. output.swf, output.jpg, etc.), regardless of how many IDs you are extracting at a time. This means that if you enter, for example:
swfextract -j 100, 101, 102 input.swf
The program creates an output.jpg file, then overwrites it twice, instead of giving you three files.
Studying swfextract.c, I saw this section:
sprintf(name, "pic%d.jpg", GET16(tag->data));
if(numextracts==1) {
filename = destfilename;
if(!strcmp(filename,"output.swf"))
filename = "output.jpg";
}
And similar sections for png, etc. If you comment out or remove the if-blocks, like so:
sprintf(name, "pic%d.jpg", GET16(tag->data));
/*if(numextracts==1) {
filename = destfilename;
if(!strcmp(filename,"output.swf"))
filename = "output.jpg";
}*/
Swfextract behaves smarter and names its output files pic100.jpg, pic101.jpg, etc. Apparently the "output" name was only meant to be used in special cases, but it somehow gets used all the time.
So, could those changes be made to the codebase? It'd make swfextract alot less unwieldy...
Oh, and I'll attach my modified file.
Sincerely,
MechR
swfextract.c
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Swftools-common] swfextract file naming,
mechcommanderrei <=