SWF To Image library - how to convert SWF flash with live changing data into series of JPEG images - ByteScout

SWF To Image library – how to convert SWF flash with live changing data into series of JPEG images

  • Home
  • /
  • Articles
  • /
  • SWF To Image library – how to convert SWF flash with live changing data into series of JPEG images


This example will show how to save frames of movie with dynamic data even if there is only one frame with dynamic data using SWF To Image library

SWF To Image library is freeware. However you are welcome to purchase 12 months tech support for it and so support development of SWF To Image library.
12 Months Tech Support via e-mail for SWF To Image library ($95 USD)

Main idea is to save 1st frame into image and then wait some time and then save image again (when movie is updated already according to dynamic data)

This is especially useful for movies where only 1 frame but objects are changed using some data (for example, live data charts, perpetual animations, flash clocks etc)

Sample below will load movie and will convert movie into image every 1000 milliseconds

Set SWFToImage = CreateObject(“SWFToImage.SWFToImageObject”)

SWFToImage.InitLibrary “demo”, “demo”

SWFToImage.InputSWFFileName = “Clocks.swf”
SWFToImage.ImageOutputType = 1 ‘ set output image type to Jpeg (0 = BMP, 1 = JPG, 2 = GIF)

SWFToImage.Execute_Begin ‘ start conversion

MsgBox “There are ” & CStr(SWFToImage.FramesCount) & ” frames to convert” & vbCRLF & “Will convert first 10 frames only”

for i=0 to 10 ‘ change to SWFTOImage.FramesCount -1 to convert all frames
SWFToImage.FrameIndex = 0 ‘ set frame index
SWFToImage.Execute_GetImage

‘ delay for 1 second
WScript.Sleep 1000

SWFToImage.SaveToFile “image_after_” & CStr(i) & “_seconds.jpg”
Next

SWFToImage.Execute_End ‘ end conversion

Tutorials:

prev
next