swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] knowing output swf size in advance


From: Bhupendra Singh
Subject: [Swftools-common] knowing output swf size in advance
Date: Thu, 14 Aug 2008 16:32:36 +0530

hi,
Is it possible to know the output swf size (compressed one) in
advance? (i.e. before writing it to the file)
there is a function swf_WriteSWC

int  swf_WriteSWC(int handle, SWF * swf)     // Writes SWF to file,
returns length or <0 if fails
{
  writer_t writer;
  int len = 0;
  swf->compressed = 1;
  if(handle<0) {
    writer_init_nullwriter(&writer);
    len = swf_WriteSWF2(&writer, swf);
  }
  writer_init_filewriter(&writer, handle);
  len = swf_WriteSWF2(&writer, swf);
  writer.finish(&writer);
  return len;
}

which suggests, if I pass handle as -1, it should return length of
bytes (compressed) it will write to a file. But when I manually pass
handle as -1,
len comes 0. :(

is there any way to know this length in advance?

-- 
Best Regards,
Bhupendra.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]