This example will demonstrate how to use SWF To Image from ASP script and convert SWF to JPEG image on the fly
Screenshot of ConvertSampleSWF.asp running and producing raster JPEG image to the browser:
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)
ASP script (ConvertSampleSWF.asp):
<%
Set SWFToImage = CreateObject(“SWFToImage.SWFToImageObject”)
SWFToImage.InputSWFFileName = Server.MapPath(“sample.swf”)
SWFToImage.ImageOutputType = 1 ‘ set output image type to Jpeg (0 = BMP, 1 = JPG, 2 = GIF)
SWFToImage.Execute
‘ get generated SWF as binary image
SWFImage = SWFToImage.BinaryImage
‘ clear the output stream
response.Clear
‘ set the content type to SWF
response.ContentType = “image/jpeg”
‘ add content type header
response.AddHeader “Content-Type”, “image/jpeg”
‘ set the content disposition
response.AddHeader “Content-Disposition”, “inline;filename=test.jpeg”
‘ write the binary image to the Response output stream
response.BinaryWrite SWFImage
response.End
‘ disconnect from library
Set SWFToImage = Nothing
%>