Howard Cantrell
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
Hi ramesh12,
How are you defining g from g.DrawImage?
How are you defining g from g.DrawImage?
ASKER
Hi ramesh12,
I am still waiting on your response.
I am still waiting on your response.
ASKER
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.
ASKER