Hi to all
Please give me code samples to merge two or more images into a single image using VB. Please send me immediately...
Thanx
5 3358
What do you mean merge images? Like picture of a dog to merge with a cat?
How program should decide what part of the image goes where?
Open paint and try to do it manually. It is tedious job even when you are looking at it.
Use Photoshop instead of VB.
Please give me code samples to merge two or more images into a single image using VB. Please send me immediately...
I think you need to be more specific about what you mean by "merge" in this context. Are you talking about morphing, or what?
No not at all morphing....
Merging in the sense combinig two or more pictures into a single one...
If we are having more than one image files then after selecting those multiple images merging operation has to be done and the selected images would be saved as a single image...
For eg, We having images like several animals as different pictures If we selected those pictures and merge then those pictures must be merged as a single one like the output having group of animals...
Got it?
Thanx...
Is it possible?
No not at all morphing....
Merging in the sense combinig two or more pictures into a single one...
If we are having more than one image files then after selecting those multiple images merging operation has to be done and the selected images would be saved as a single image...
For eg, We having images like several animals as different pictures If we selected those pictures and merge then those pictures must be merged as a single one like the output having group of animals...
Got it?
Thanx...
Is it possible?
Here is the code you should check out.
I deserve no credit for this code, however it functions with the result I believe you are attempting to achieve.
In Control properties, browse for Picture 1 and assign it to picSource.
Now, browse for picture 2 and assign it to picDestination.
With These Controls In the frmMain Module.
barAmount (Slider)
Label1,Label2,Label3,Label4
lblInfo
picDestination
picSource -
'*****************************CODE IN FORM MODULE
-
-
-
' ********************************************
-
' ** Purpose: Alpha Blending Pictures
-
' ** Website : www.svenni.com
-
' ** Programmer : Sveinn R. Sigurdsson
-
' ** e-mail : depill2000@hotmail.com
-
' ********************************************
-
Option Explicit
-
-
' API DECLARATION [ ALPHA BLEND FUNCTION ]
-
Private Declare Function AlphaBlend Lib "msimg32" ( _
-
ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, _
-
ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, _
-
ByVal xSrc As Long, ByVal ySrc As Long, ByVal widthSrc As Long, _
-
ByVal heightSrc As Long, ByVal blendFunct As Long) As Boolean
-
-
' API DECLARATIONS [ COPY MEMORY FUNCTION ]
-
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
-
Destination As Any, Source As Any, ByVal Length As Long)
-
-
' TYPE STRUCTURES
-
Private Type typeBlendProperties
-
tBlendOp As Byte
-
tBlendOptions As Byte
-
tBlendAmount As Byte
-
tAlphaType As Byte
-
End Type
-
-
Private Sub barAmount_Scroll()
-
' Procedure Scope Declarations
-
Dim tProperties As typeBlendProperties
-
Dim lngBlend As Long
-
' Clear the destination picture
-
picDestination.Cls
-
tProperties.tBlendAmount = 255 - barAmount
-
' Call the 'CopyMemory' with the specified parameters
-
CopyMemory lngBlend, tProperties, 4
-
' Blend the pictures together and show them at the specified
-
' location in the specified picture box.
-
AlphaBlend picDestination.hDC, 0, 0, picSource.ScaleWidth, picSource.ScaleHeight, _
-
picSource.hDC, 0, 0, picSource.ScaleWidth, picSource.ScaleHeight, lngBlend
-
' Refresh the picture box with the new image
-
picDestination.Refresh
-
End Sub
-
Please resond if this is your intended goal or if an alternate goal is expected.
Good luck.
RE: My Last Reply : ALPHABLENDING
It is obvious that some controls are not needed, however I did not wish to hack apart another developers code for the example. The labels are not required and with a common dialog and proper code you can easily change the application to the user to select images during runtime. The AlphaBlending API was apparently shipped with Win98 and allows the user to set transparency level of a picture.
Good Luck, Again.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Wayne |
last post by:
I have a script that uses filesystemobject that reads
files from a given path, in my case images. It is running
on a server that is 2000 adv svr w/ all current patches.
The script prior to some...
|
by: Penelope Baker |
last post by:
Greetings:
I cannot seem to get IE 6.0 to pre-cache my rollover images. Every time the
user rolls over a link, it rereads it from the server, even though it is
well into the cache by that time....
|
by: Julie |
last post by:
Hi,
I'm trying to change images on a website without reloading the whole
page and use the following code to preload the images:
var preloadFlag = false;
function preloadImages() {
if...
|
by: Simon |
last post by:
This problem has been driving me mad for months.... Seen a few posts on
forums about it but no answers... No mention on MSDN etc.
XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a...
|
by: Bernie Raffe |
last post by:
When I change the 'cookieless' flag in the WebConfig file to true,
everything works fine on my local PC, but the images fail to appear when
using the remote server.
I specify my images...
|
by: Alex |
last post by:
I have a web application hosted on the server's F:\www directory. I have images stored on the file system at E:\Images. I have the website shared thru IIS pointing to the F:\www directory.
1.)...
|
by: toxicpaint |
last post by:
Hi, can anyone give me a hand.
I'm currently displaying 4 random images at the top of a page. I did this using an array of 35 pictures and then writing them to page. The problem I have is that in...
|
by: remon87 |
last post by:
I need some help.
I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |