Link to home
Start Free TrialLog in
Avatar of Howard Cantrell
Howard CantrellFlag for United States of America

asked on

Looking for code to append or save two or more Bmps together.

I have searched and can only find a saveadd to tiff. Looking for a way to add or append or something; to save two or more Bmps  or jpegs together. Working in VB.Net.
ASKER CERTIFIED SOLUTION
Avatar of ramesh12
ramesh12

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 Howard Cantrell

ASKER

I have to go to a meeting. But I will check code and see you tomorrow.
Avatar of AerosSaga
AerosSaga

Try this One:

Private Sub cmdAppend_Click()
    Dim strOrigFile, strAppendFile As String
    Dim lngPgCount As Long
    'This is the displayed image to which we are appending.
    ImgAdmin1.Image = "D:\image2\original.tif"
    'Because we are using the dialog box to pick the file for append,
    'we need to save the original file.
    strOrigFile = ImgAdmin1.Image
    ImgAdmin1.DialogTitle = "Select the file to be appended to the
        displayed image"
    ImgAdmin1.ShowFileDialog OpenDlg
    strAppendFile = ImgAdmin1.Image
    'Restore the original filename to the Image property because
    'the property must contain the destination file name.
    ImgAdmin1.Image = strOrigFile
    'Append 3 pages starting with page 1.
    ImgAdmin1.Append strAppendFile, 1, 3
End Sub

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/3rdparty/html/iac_method_append_example.asp

Regards,

Aeros
Hi ramesh12,
How are you defining  g from g.DrawImage?

Hi ramesh12,
I am still waiting on your response.


        dim imgOut as image = New Bitmap(2 * imgFile1.Width, imgFile1.Height)
        Dim g As Graphics = Graphics.FromImage(imgOut)    '<------********

 ****  I am not happy that you left this part of the code out of your post.
It took me 3 days the search your different codes on the internet to find the missing link.
But all in all  you do get the points.


   
Oh I am sorry I did not open EE until today. Sorry for that.