Solved

Using VB.Net To Convert Animation To Bitmap

Posted on 2004-08-02
9
795 Views
Last Modified: 2013-12-03
Hi I've written a program that reads into an animations frame and extracts each fame onto seperate pictureboxes on a single form. The frames a placed side by side so when you view the program when its finished it displays each animation sequence as a frame one after the other. What I would like to do is save the entire animation frame (each frame) as one single bitmap so when I load it up in Paint Shop Pro 8 or Microsoft Paint it displays the entire animation frame as a single bitmap picture.
0
Comment
Question by:maykut
  • 5
  • 2
  • 2
9 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
Comment Utility
ok ... do you have them into either a bitmap or image object ? if so you sould just use the .save method ...

if not ...

look http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20850641.html here .... it discusses how to save a picturebox to a bitmap.
0
 
LVL 1

Author Comment

by:maykut
Comment Utility
I don't have them as seprate bitmaps, I don't want to save them as seprate bitmaps. I want to load each frame into a seperate picturebox and save the combination of frames as single bitmap. i.e.


  --------  ------   -------
 |         ||       ||        |
 |         ||       ||        |
 --------- ------   -------

See the above 3 frames. Each frame is a seprate picturebox, which contains each frame of the animation I want to save them as a complete bitmap (just a single bitmap file), so when I load it up into Paintshop Pro 8 or Microsoft Paint I can see each frame (just by opening up the single bitmap). I'll attach my code.



My Animation Class

Imports System
Imports System.Drawing
Imports System.Drawing.Image
Imports System.Runtime.Serialization.Formatters.Binary
Public Class Animation
    Implements IDisposable
    Dim m_Img As System.Drawing.Image
    Dim m_Frames As New System.Collections.ArrayList
    Dim m_FrameCount As Integer
    Dim i As Integer = 0
    Dim m_Width, m_Height, xWidth, yHeight As Integer
    Dim array As New ArrayList
    Dim FCount As Integer

    Public Sub New(ByVal imgPath As String)
        'Load Image
        m_Img = System.Drawing.Image.FromFile(imgPath)
        xWidth = m_Img.Width
        yHeight = m_Img.Height
        'Check if It's an Animation
        If System.Drawing.ImageAnimator.CanAnimate(m_Img) = False Then
            m_Img.Dispose()

            'if not animation throe a new exception
            Throw New Exception("This is not a Animation")
        End If

        'Count Animation Frames
        Dim fdl As New Drawing.Imaging.FrameDimension(m_Img.FrameDimensionsList(0))
        m_FrameCount = m_Img.GetFrameCount(fdl)

        'extract the first frame and start animation to extract all frames
        AddCurrentFrame()
        System.Drawing.ImageAnimator.Animate(m_Img, New EventHandler(AddressOf OnFrameChanged))

        Do 'Loop until end of frame
        Loop Until Done

    End Sub

    Public Sub Dispose() Implements System.IDisposable.Dispose
        StopAnimate()
    End Sub

    Public ReadOnly Property FrameCount() As Integer
        Get
            Return m_FrameCount
        End Get
    End Property
    Public ReadOnly Property AnimWidth() As Integer
        Get
            Return xWidth
        End Get
    End Property
    Public ReadOnly Property AnimHeight() As Integer
        Get
            Return yHeight
        End Get
    End Property
    Public ReadOnly Property Frame(ByVal index As Integer) As System.Drawing.Bitmap
        Get
            Return DirectCast(m_Frames(index), System.Drawing.Bitmap)
        End Get
    End Property

    Private Sub OnFrameChanged(ByVal sender As Object, ByVal e As EventArgs)
        If Done Then
            StopAnimate()
            Exit Sub
        End If

        System.Drawing.ImageAnimator.UpdateFrames(m_Img)
        AddCurrentFrame()
    End Sub

    Private Sub AddCurrentFrame()

        'Create new Empty Bitmap
        Dim bmp As New Bitmap(xWidth, yHeight)
        Dim pos, pos2 As Point
        Dim g As Graphics = System.Drawing.Graphics.FromImage(DirectCast(bmp, System.Drawing.Image))
       
        pos = New Point(0, 0)
        g.DrawImage(m_Img, pos)
        m_Frames.Add(bmp)

        'g.DrawImage(m_Img, New Rectangle(i, 0, xWidth, yHeight))
        'm_Frames.Add(bmp)

    End Sub
    ' Return True when the class has extracted all the frames
    Private ReadOnly Property Done() As Boolean
        Get
            Return m_Frames.Count = FrameCount
        End Get
    End Property

    ' Stop the animation and dispose the open image object
    Private Sub StopAnimate()
        System.Drawing.ImageAnimator.StopAnimate(m_Img, _
            New EventHandler(AddressOf OnFrameChanged))
        m_Img.Dispose()
    End Sub
    Public Sub NextFrame()
        i = i + xWidth
    End Sub
End Class


Main Program

Imports System
Imports System.Drawing
Imports System.Drawing.Image
Imports System.Drawing.Imaging
Imports System.IO
Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim i As Integer = 1
    Dim count As Integer = 1
    Dim bmp As Bitmap
    Dim g As Graphics = CreateGraphics()
    Dim im() As Image
    Dim strFileName As String
    Dim rect As Rectangle
    Dim m_MouseDown As Boolean = False
    Dim Anim As Animation
    Dim PicBoxCount As Integer = 1
    Dim FrameCount As Integer = 1
    Dim xPos As Integer = 0
    Dim yPos As Integer = 32
    Dim xSave As Integer
    Dim xSize, ySize As Integer
    Dim PictureBox() As PictureBox
    'Dim sz As Size
    'Dim sz As New Size(100, 60)

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem6 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem7 As System.Windows.Forms.MenuItem
    Friend WithEvents tb As System.Windows.Forms.ToolBar
    Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
    Friend WithEvents btnNew As System.Windows.Forms.ToolBarButton
    Friend WithEvents btnOpen As System.Windows.Forms.ToolBarButton
    Friend WithEvents btnSave As System.Windows.Forms.ToolBarButton
    Friend WithEvents btnDraw As System.Windows.Forms.ToolBarButton
    Friend WithEvents MenuItem8 As System.Windows.Forms.MenuItem
    Friend WithEvents HScrollBar1 As System.Windows.Forms.HScrollBar
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
    Friend WithEvents MenuItem9 As System.Windows.Forms.MenuItem
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
        Me.MainMenu1 = New System.Windows.Forms.MainMenu
        Me.MenuItem1 = New System.Windows.Forms.MenuItem
        Me.MenuItem2 = New System.Windows.Forms.MenuItem
        Me.MenuItem3 = New System.Windows.Forms.MenuItem
        Me.MenuItem4 = New System.Windows.Forms.MenuItem
        Me.MenuItem5 = New System.Windows.Forms.MenuItem
        Me.MenuItem8 = New System.Windows.Forms.MenuItem
        Me.MenuItem6 = New System.Windows.Forms.MenuItem
        Me.MenuItem7 = New System.Windows.Forms.MenuItem
        Me.MenuItem9 = New System.Windows.Forms.MenuItem
        Me.tb = New System.Windows.Forms.ToolBar
        Me.btnNew = New System.Windows.Forms.ToolBarButton
        Me.btnOpen = New System.Windows.Forms.ToolBarButton
        Me.btnSave = New System.Windows.Forms.ToolBarButton
        Me.btnDraw = New System.Windows.Forms.ToolBarButton
        Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
        Me.HScrollBar1 = New System.Windows.Forms.HScrollBar
        Me.PictureBox1 = New System.Windows.Forms.PictureBox
        Me.SuspendLayout()
        '
        'MainMenu1
        '
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem6, Me.MenuItem9})
        '
        'MenuItem1
        '
        Me.MenuItem1.Index = 0
        Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2, Me.MenuItem3, Me.MenuItem4, Me.MenuItem5, Me.MenuItem8})
        Me.MenuItem1.Text = "File"
        '
        'MenuItem2
        '
        Me.MenuItem2.Index = 0
        Me.MenuItem2.Text = "Open"
        '
        'MenuItem3
        '
        Me.MenuItem3.Index = 1
        Me.MenuItem3.Text = "Save"
        '
        'MenuItem4
        '
        Me.MenuItem4.Index = 2
        Me.MenuItem4.Text = "Save As.."
        '
        'MenuItem5
        '
        Me.MenuItem5.Index = 3
        Me.MenuItem5.Text = "Exit"
        '
        'MenuItem8
        '
        Me.MenuItem8.Index = 4
        Me.MenuItem8.Text = "Load Animation"
        '
        'MenuItem6
        '
        Me.MenuItem6.Index = 1
        Me.MenuItem6.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem7})
        Me.MenuItem6.Text = "Insert"
        '
        'MenuItem7
        '
        Me.MenuItem7.Index = 0
        Me.MenuItem7.Text = "Insert Image"
        '
        'MenuItem9
        '
        Me.MenuItem9.Index = 2
        Me.MenuItem9.Text = ""
        '
        'tb
        '
        Me.tb.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.btnNew, Me.btnOpen, Me.btnSave, Me.btnDraw})
        Me.tb.DropDownArrows = True
        Me.tb.ImageList = Me.ImageList1
        Me.tb.Location = New System.Drawing.Point(0, 0)
        Me.tb.Name = "tb"
        Me.tb.ShowToolTips = True
        Me.tb.Size = New System.Drawing.Size(736, 28)
        Me.tb.TabIndex = 2
        '
        'btnNew
        '
        Me.btnNew.ImageIndex = 0
        Me.btnNew.ToolTipText = "New"
        '
        'btnOpen
        '
        Me.btnOpen.ImageIndex = 1
        Me.btnOpen.ToolTipText = "Open Graphics"
        '
        'btnSave
        '
        Me.btnSave.ImageIndex = 2
        Me.btnSave.ToolTipText = "Save Graphics"
        '
        'btnDraw
        '
        Me.btnDraw.ImageIndex = 3
        Me.btnDraw.ToolTipText = "Draw Graphics in Memory"
        '
        'ImageList1
        '
        Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
        Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
        Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
        '
        'HScrollBar1
        '
        Me.HScrollBar1.Location = New System.Drawing.Point(0, 328)
        Me.HScrollBar1.Name = "HScrollBar1"
        Me.HScrollBar1.Size = New System.Drawing.Size(728, 16)
        Me.HScrollBar1.TabIndex = 3
        '
        'PictureBox1
        '
        Me.PictureBox1.Location = New System.Drawing.Point(0, 32)
        Me.PictureBox1.Name = "PictureBox1"
        Me.PictureBox1.Size = New System.Drawing.Size(736, 288)
        Me.PictureBox1.TabIndex = 4
        Me.PictureBox1.TabStop = False
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(736, 345)
        Me.Controls.Add(Me.PictureBox1)
        Me.Controls.Add(Me.HScrollBar1)
        Me.Controls.Add(Me.tb)
        Me.Menu = Me.MainMenu1
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
        Dim oFileOpen As New OpenFileDialog
        oFileOpen.Filter = "All Files|*.*|Bitmap|*.bmp|Gif|*.gif|Jpeg|*.jpg|PNG File|*.png"
        'oFileOpen.Filter = "All Files(*.*)|*.*|Bitmap(*.bmp)|*.bmp|Gif(*.gif)|*.gif|Jpeg(*.jpg)|*.jpg||PNG Files(*.png)|*.png"
        oFileOpen.ShowDialog()
        strFileName = oFileOpen.FileName
        If strFileName = Nothing Then Exit Sub
        'Dim bmp As New Bitmap(strFileName)
        ReDim Preserve im(i)
        im(i) = New Bitmap(strFileName)

        'bmp = New Bitmap(strFileName)
        'ReDim Preserve bmp(i)
        i = i + 1
        'vPicBox.Image = bmp
        'PictureBox1.Image = bmp

        'bmp(i).FromFile(strFileName)
        'i = i + 1
        'PictureBox1.Image = bmp(i)
        'bmp(i) = New Bitmap


        'Dim bmp As New Bitmap(strFileName)
        'PictureBox1.Image = bmp
    End Sub

    Private Sub MenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem7.Click
        Dim oFileOpen As New OpenFileDialog
        oFileOpen.Filter = "All Files|*.*|Bitmap|*.bmp|Gif|*.gif|Jpeg|*.jpg|PNG File|*.png"
        'oFileOpen.Filter = "All Files(*.*)|*.*|Bitmap(*.bmp)|*.bmp|Gif(*.gif)|*.gif|Jpeg(*.jpg)|*.jpg||PNG Files(*.png)|*.png"
        oFileOpen.ShowDialog()
        strFileName = oFileOpen.FileName
        If strFileName = Nothing Then Exit Sub
        ReDim Preserve im(i)
        im(i) = New Bitmap(strFileName)
        i = i + 1
        'Dim bmps As New Bitmap(strFileName)
        'Dim im As Image
        'Dim Rec As Rectangle
        'bmp.p
        'Rec = New Rectangle(10, 10, bmp.Width, bmp.Height)
        'im.
        'PictureBox1.Image = bmps

    End Sub
    Protected Overrides Sub OnDragEnter(ByVal e As DragEventArgs)

        If e.Data.GetDataPresent(DataFormats.FileDrop) Then
            Dim allow As Boolean = True
            Dim s As String
            For Each s In CType(e.Data.GetData(DataFormats.FileDrop), String())
                Dim ext As String = Path.GetExtension(s).ToLower()
                If Not (ext = ".jpg" OrElse ext = ".jpeg" OrElse ext = ".tif" OrElse ext = ".gif" OrElse ext = ".bmp") Then
                    allow = False
                End If
            Next s
            If allow Then
                e.Effect = DragDropEffects.Copy
            Else
                e.Effect = DragDropEffects.None
            End If
        End If
    End Sub 'OnDragEnter


    Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem5.Click
        Application.Exit()
    End Sub

    Private Sub tb_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tb.ButtonClick
        Dim index As Integer

        index = e.Button.ImageIndex

        Select Case index
            Case 0
                i = 1
                count = 1
            Case 1
            Case 2
            Case 3
                Try
                    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                    'Working Code using multiple picture boxes
                    'Dim xSize, ySize As Integer
                    xSize = Anim.AnimWidth
                    ySize = Anim.AnimHeight
                    Dim sz As New Size(xSize, ySize)
                    Dim AnimFrame As Bitmap = Anim.Frame(FrameCount)
                    Dim pos As Point

                    ReDim Preserve PictureBox(FrameCount)
                    pos = New Point(xPos, yPos)
                    PictureBox(FrameCount) = New PictureBox
                    PictureBox(FrameCount).Size = sz
                    PictureBox(FrameCount).Location = pos
                    PictureBox(FrameCount).BackColor = Color.Blue
                    Me.Controls.Add(PictureBox(FrameCount))
                    PictureBox1.Controls.Add(PictureBox(FrameCount))
                    PictureBox(FrameCount).Image = AnimFrame

                    FrameCount = FrameCount + 1
                    xPos = xPos + xSize
                    'ySave += yPos
                    xSave += xSize
                    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


                    'Dim AnimFrame As Bitmap = Anim.Frame(FrameCount)
                    'PictureBox1.Image = AnimFrame
                    'FrameCount = FrameCount + 1
                    'Anim.NextFrame()
                    'Dim AnimFrame2 As Bitmap = Anim.Frame(FrameCount)
                    'PictureBox1.Image = AnimFrame
                Catch ex As Exception
                    MsgBox(ex.ToString)
                End Try

        End Select

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'vPicBox.AllowDrop = True
    End Sub

    'Private Sub oPicBox_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs)
    'If Not vPicBox.Image Is Nothing Then
    'm_MouseDown = True
    'End If
    'End Sub
    'Private Sub oPicBox_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs)
    'If m_MouseDown Then
    'vPicBox.DoDragDrop(oPicBox.Image, DragDropEffects.Copy Or DragDropEffects.Move)
    'Else
    'm_MouseDown = False
    'End If
    'End Sub

    'Private Sub vPicBox_DragEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs)
    'If e.Data.GetDataPresent(DataFormats.Bitmap) Then
    'If e.KeyState = 9 Then
    'e.Effect = DragDropEffects.Copy
    'Else
    'e.Effect = DragDropEffects.Move
    'End If
    'Else
    'e.Effect = DragDropEffects.None
    'End If
    'End Sub

    'Private Sub vPicBox_DragDrop(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs)
    'vPicBox.Image = e.Data.GetData(DataFormats.Bitmap)
    'If Not e.KeyState = 8 Then
    'oPicBox.Image = Nothing
    'End If
    'End Sub

    Private Sub MenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem8.Click
        Dim oFileOpen As New OpenFileDialog
        Dim i As Integer = 1
        oFileOpen.Filter = "Animation|*.gif"
        'oFileOpen.Filter = "All Files(*.*)|*.*|Bitmap(*.bmp)|*.bmp|Gif(*.gif)|*.gif|Jpeg(*.jpg)|*.jpg||PNG Files(*.png)|*.png"
        oFileOpen.ShowDialog()
        strFileName = oFileOpen.FileName
        If strFileName = Nothing Then Exit Sub
        Anim = New Animation(strFileName)
    End Sub

    Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click
        Dim oSaveFile As New SaveFileDialog
        oSaveFile.Filter = "Bitmap|*.bmp"
        oSaveFile.ShowDialog()
        Dim strSaveName As String = oSaveFile.FileName.ToLower
        'Dim myBitmap As Bitmap = PictureBox().image
        Dim bmp As New Bitmap(xSave, ySize, Imaging.PixelFormat.Format32bppRgb)
        'With PictureBox1
        Dim im As Image
        With PictureBox1
            .Image = bmp
            bmp.Save(strSaveName, System.Drawing.Imaging.ImageFormat.Bmp)
        End With

        'Dim myBitmap As Bitmap = PictureBox1.Image
        'bmp.Save(strSaveName, System.Drawing.Imaging.ImageFormat.Bmp)
        'myBitmap.Save(strSaveName, ImageFormat.Bmp)

    End Sub

    Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click

    End Sub
End Class
0
 
LVL 37

Expert Comment

by:gregoryyoung
Comment Utility
basically you just want to tile them into one image ?

you would just draw them into a graphics object, one after the other ...
0
 
LVL 1

Author Comment

by:maykut
Comment Utility
how do you do that. Can you show me an example.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Author Comment

by:maykut
Comment Utility
how can I do that is there any examples out there can you help me with this.
0
 
LVL 27

Accepted Solution

by:
planocz earned 30 total points
Comment Utility
Hi maykut ,

Change this in your code and run agif by load then click on your last toolbar button...


'IN the form1

   Private Sub tb_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tb.ButtonClick
        Dim index As Integer

        index = e.Button.ImageIndex

        Select Case index
            Case 0
                i = 1
                count = 1
            Case 1
            Case 2
            Case 3
                Try
                    Dim x As Short
                    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                    'Working Code using multiple picture boxes
                    'Dim xSize, ySize As Integer
                    For x = 0 To Anim.FrameCount - 1
                        xSize = Anim.AnimWidth
                        ySize = Anim.AnimHeight
                        Dim sz As New Size(xSize, ySize)
                        Dim AnimFrame As Bitmap = Anim.Frame(x)
                        Dim pos As Point

                        ReDim Preserve PictureBox(x)
                        pos = New Point(xPos, yPos)
                        PictureBox(x) = New PictureBox
                        PictureBox(x).Size = sz
                        PictureBox(x).Location = pos
                        PictureBox(x).BackColor = Color.Blue
                        Me.Controls.Add(PictureBox(x))
                        PictureBox1.Controls.Add(PictureBox(x))
                        PictureBox(x).Image = AnimFrame

                        xPos = xPos + xSize
                        'ySave += yPos
                        xSave += xSize
                        ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
                    Next

                    'Dim AnimFrame As Bitmap = Anim.Frame(FrameCount)
                    'PictureBox1.Image = AnimFrame
                    'FrameCount = FrameCount + 1
                    'Anim.NextFrame()
                    'Dim AnimFrame2 As Bitmap = Anim.Frame(FrameCount)
                    'PictureBox1.Image = AnimFrame
                Catch ex As Exception
                    MsgBox(ex.ToString)
                End Try

        End Select

    End Sub
0
 
LVL 27

Expert Comment

by:planocz
Comment Utility
Also change this in your form1

    Dim yPos As Integer = 0 '32
0
 
LVL 1

Author Comment

by:maykut
Comment Utility
ok thanks guys, but I want to save the tiled up images, everytime I try to save it it appears as a blank picture. How do I know save the tiled up images.
0
 
LVL 1

Author Comment

by:maykut
Comment Utility
Thanks guys I've worked it out. I can know save my images as single bitmaps.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now