(E-Mail Removed) (John Williams) wrote in message news:<(E-Mail Removed)>...
> Thank you, both. This does indeed look like what I need. I'll investigate further.
The following code almost achieves what I want. It creates a 400 x
400 pixel Png file containing 4 Gifs. Each Gif is 200 x 200.
However the resultant Png contains 1 bitmap, whereas the manual
Fireworks procedure creates 4 bitmaps each containing 1 image which
can be manipulated individually. I would like the program to do the
same. Any ideas?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim strGifs(3) As String
Dim i, pos(3, 1) As Integer
Dim oBmpPng As Bitmap
Dim oGraphics As Graphics
Dim oImgTile As Image
'Creates a 400 x 400 pixel Png file containing 4 Gifs. Each
Gif is 200 x 200
strGifs(0) = "TQ09NW04.gif"
strGifs(1) = "TQ09NW08.gif"
strGifs(2) = "TQ09NW24.gif"
strGifs(3) = "TQ09NW28.gif"
pos(0, 0) = 0 : pos(0, 1) = 0
pos(1, 0) = 0 : pos(1, 1) = 200
pos(2, 0) = 200 : pos(2, 1) = 0
pos(3, 0) = 200 : pos(3, 1) = 200
oBmpPng = New Bitmap(400, 400)
oGraphics = Graphics.FromImage(oBmpPng)
For i = 0 To 3
oImgTile = Image.FromFile(strFolder + strGifs(i))
oGraphics.DrawImage(oImgTile, pos(i, 0), pos(i, 1))
Next
oBmpPng.Save(strFolder + "test.png")
oBmpPng.Dispose()
End Sub