Link to home
Start Free TrialLog in
Avatar of nickwoolley
nickwoolley

asked on

Creating one image file from two

I have 2 scanned images (tif format) and I want to transfer them to one larger file. So if each image is 100x100 pixels then the larger file would be say 200x100.

What's the easiest method please?
Avatar of tandrei
tandrei

Private Sub Command1_Click()
    Dim i As Integer, j As Integer
    picTarget.Width = Picture1.Width + Picture2.Width
    picTarget.Height = Picture1.Height
    For i = 0 To Picture1.Image.Height
        For j = 0 To Picture1.Image.Width
            picTarget.PSet (i, j), Picture1.Point(i, j)
        Next
        For j = 0 To Picture2.Image.Width
            picTarget.PSet (i, j + Picture1.Image.Width), Picture2.Point(i, j)
        Next
    Next

End Sub
'add 3 picture boxes on your form; Picture1 and Picture2 are autosize and load them with your images; it is slow, but should work
ASKER CERTIFIED SOLUTION
Avatar of rspahitz
rspahitz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Richie_Simonetti
every picture question has a rspahitz's comment!
:))
I guess I just have too much fun with it!
Avatar of nickwoolley

ASKER

rspahitz: That works for Pictureboxes, but what about image controls?