Sign In  Sign Up Live-Chat

Make SWF file from Images

Last post 06-11-2008, 9:37 AM by alcrus. 9 replies.
Sort Posts: Previous Next
  •  06-11-2008, 12:41 AM 130873

    Make SWF file from Images

    Hello,

    I can create images from extracting DOC/PDF files using Aspose.Words / Aspose.Pdf.

    Now i want to create one flash(.swf) file from those images.

    Can any one suggest me, How i can do that ??

    Images in SWF file via Aspose.Flash.

    Please reply me,

     

    Thanks

    Kishan

     

    Filed under: aspose.flash
     
  •  06-11-2008, 1:30 AM 130876 in reply to 130873

    Re: Make SWF file from Images

    Dear Kishan,

    Thanks for considering Aspose.Flash.

    You can see example of adding image from this thread.

    http://www.aspose.com/community/forums/thread/113860/create-new-image-without-border.aspx  


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  06-11-2008, 1:56 AM 130877 in reply to 130876

    Re: Make SWF file from Images

    Dear Shakeel ,

    Thanks for your quick reply,

    Sorry for mistaken for the SWF file Instead of FLV file.

    Can u please tell me how do i create Flash(.FLV) file from extracted Images or any images.

    Please reply me ASAP.

    Its Urgent,

     

    Many Thanks

    Kishan

     


     

    Filed under: aspose.flash
     
  •  06-11-2008, 3:58 AM 130896 in reply to 130873

    Re: Make SWF file from Images

    Hey guys ,

    Please reply me ASAP

    Its Urgent one

    Once again Thanks

    Kishan

     

     

    Filed under: aspose.flash
     
  •  06-11-2008, 5:10 AM 130909 in reply to 130896

    Re: Make SWF file from Images

    Here is the code for creating .FLV file from SWF

    Here i am getting .flv file which is of no any data into that.

    Please reply me,

    Private Shared Sub AddImageWithoutBorders()

    Dim flash As New Swf.FlashContainer()

    'set frame rate

    flash.FrameRate = 12.0F

    'set frame size

    flash.FrameSize = New Basic.Rect(0, 0, 11000, 8000)

    'Add the background colour

    flash.Add(New Swf.SetBackgroundColor(New Basic.RGB(255, 255, 255, 255)))

    'Add the image without borders

    'Get all the objects needed for adding image in swf file

    Dim flashObjs1 As ArrayList = AddImage(flash.NewIdentifier(), flash.NewIdentifier(), "d:\kishan\TestAspose\Bluehills.jpg", 500, 500, 5000, _

    3000)

    Dim flashObjs2 As ArrayList = AddImage(flash.NewIdentifier(), flash.NewIdentifier(), "d:\kishan\TestAspose\sunset.jpg", 500, 500, 5000, _

    3000)

    Dim flashObjs3 As ArrayList = AddImage(flash.NewIdentifier(), flash.NewIdentifier(), "d:\kishan\TestAspose\Winter.jpg", 500, 500, 5000, _

    3000)

    flash.Add(flashObjs2)

    'flash.Write("d:\kishan\TestAspose\out.swf")

    ' Open output file stream

    Dim fileStream As IO.Stream = New IO.FileStream("d:\kishan\TestAspose\movie.flv", FileMode.Create)

    ' Create FLV packer

    Dim packer As IPacker = New FLVPacker(fileStream)

    ' Created FLV movie and write it to the stream

    packer.Pack(flash)

    ' Close stream

    fileStream.Flush()

    fileStream.Close()

    End Sub

    Private Shared Function AddImage(ByVal imgID As Integer, ByVal shpID As Integer, ByVal imageFile As String, ByVal X As Integer, ByVal Y As Integer, ByVal Width As Integer, _

    ByVal Height As Integer) As ArrayList

    Dim flashObjs As New ArrayList()

    Dim bmp As New Bitmaps.FlashBitmap(imgID, FlashBitmapType.FlashBitmapJpeg, False, imageFile)

    flashObjs.Add(bmp)

    'Calculate scaling factor

    Dim scaleX As Double = CDbl(Width) / CDbl(bmp.Width)

    Dim scaleY As Double = CDbl(Height) / CDbl(bmp.Height)

    'Create a rectangle shape with image as a fill via ShapeManager

    Dim shapeManager As New Shapes.ShapeManager()

    shapeManager.Add(New Shapes.SolidLine(1, New Basic.RGB(255, 0, 0, 255)))

    shapeManager.Add(New Shapes.BitmapFill(FillStyleType.NonSmoothedClippedBitmap, imgID, New Basic.MatrixTransform(X, Y, scaleX, scaleY)))

    shapeManager.DrawRectangle(X, Y, Width, Height)

    'Add the shape and place it on display list

    Dim defshp As Shapes.DefineShape2 = shapeManager.GetDefineShape(shpID)

    Dim scr As Shapes.StyleChangeRecord = TryCast(defshp.Shape.ShapeList(0), Shapes.StyleChangeRecord)

    scr.LineStyle = -2147483648

    flashObjs.Add(defshp)

    flashObjs.Add(New Swf.PlaceObject2(shpID, 1, 0, 0))

    Return flashObjs

    End Function

    Filed under: aspose.flash
     
  •  06-11-2008, 5:45 AM 130915 in reply to 130909

    Re: Make SWF file from Images

    Aspose.Flash can convert only Video/Audio FLV<->SWF.
    Normal SWF files with frames and images can't be converted to any other formats.

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  06-11-2008, 5:51 AM 130916 in reply to 130915

    Re: Make SWF file from Images

    Hello alcrus,

    Thanks for your reply.

    Now Please tell me how do i convert some Images into an .FLV file Using Aspose.Flash ???

    Please reply me

    Thanks

    Kishan

     

     

    Filed under: aspose.flash
     
  •  06-11-2008, 6:10 AM 130919 in reply to 130916

    Re: Make SWF file from Images

    You can't do it with Aspose.Flash.

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  06-11-2008, 6:48 AM 130924 in reply to 130919

    Re: Make SWF file from Images

    Thanks alcrus ,

    For your Quick reply.

    But is there any other solution that i can do this by using any other Aspose library.

    I need such a component that can create .FLV file using images Extracted from Aspose.Words OR Aspose.Pdf OR Apsose.Slides.

    Can you suggest me any other way ?

    Kishan

    Filed under: aspose.flash
     
  •  06-11-2008, 9:37 AM 130943 in reply to 130924

    Re: Make SWF file from Images

    Our components don't support export to FLV format.

    If you need export images (or video) to FLV why not use
    something simple, for example ffmpeg or maybe avisynth+ffmpeg?

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
View as RSS news feed in XML