|
-
Jan 24th, 2010, 06:48 AM
#1
Thread Starter
Hyperactive Member
picture merge
hi all.
im wanting to merge two pictures together.
im not sure were to start,
my pictures are 800*800 and i want to add a border to them
thanks in advance
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
-
Jan 24th, 2010, 09:38 AM
#2
Re: picture merge
Merge? If you just want to draw a border around a picture...
Code:
Private Sub Command1_Click()
With Picture1
.AutoSize = True
.AutoRedraw = True
.BorderStyle = vbBSNone
.ScaleMode = vbPixels
'*****change the path below to your bmp
.Picture = LoadPicture("C:\SomeFolder\SomePic.bmp")
End With
DrawBorder Picture1, vbBlue, 6 'change as desired
End Sub
Private Sub DrawBorder(Pic As PictureBox, BorderColor As Long, BorderWidth As Long)
Dim SW As Long, SH As Long
With Pic
SW = .ScaleWidth
SH = .ScaleHeight
.DrawWidth = BorderWidth
End With
Pic.Line (0, 0)-(SW - 1, SH - 1), BorderColor, B
End Sub
-
Jan 24th, 2010, 09:47 AM
#3
Re: picture merge
Can you describe what you mean by merge.
If say pixel(0,0) in one had a value of &h60FF30 and in two the value was &hFF0020 what would the merged pixel be?
Is this a one off or would you like a general solution and do you know what colour depth the pictures are. (there is a possible very quick and dirty solution if the merging is not just a simple OR)
Last edited by Milk; Jan 24th, 2010 at 09:50 AM.
W o t . S i g
-
Jan 24th, 2010, 10:57 AM
#4
Re: picture merge
C owl
By "merge", do you simply mean that you want
them side-by-side (such that you end up with
an image 800*1600 (height*width)?
Spoo
-
Jan 24th, 2010, 11:32 AM
#5
Thread Starter
Hyperactive Member
Re: picture merge
hi all again
i mean merge by.
one picture on the botttom and one on the top. the one on top has a square hole in the middle of it so yo can see the picture below
thanks
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
-
Jan 24th, 2010, 11:59 AM
#6
Re: picture merge
Well bitmaps don't have holes. I assume the one with the "hole" is the border, correct? In that case you can BitBlt/PaintPicture just the "non-hole" portion to the 2nd bitmap.
Edited: On NT-based systems, you could also use TransparentBlt if the "hole" is a color nowhere else in the border bitmap.
Will the bitmaps always be the same size? If not,
1. What happens when the border bitmap is larger than the other one?
2. What happens when the other is larger than the border bitmap?
Hmmm, is the border/frame image a transaprent GIF?
Last edited by LaVolpe; Jan 24th, 2010 at 12:23 PM.
-
Jan 24th, 2010, 12:22 PM
#7
Re: picture merge
C_owl
Would this accomplish what you want....
Use 2 PictureBoxes (PBs), one for each image, where
PB1 has the image "with the square hole"
PB2 has the image "you can see below"
Place PB2 "on top" of PB1 by setting the ZOrder, as in
PB2.ZOrder = 0
Natch, you'll need to fiddle with Height, Width, Top, and Left
of PB2 to get it where you want it in relationship to PB1 in
order to create the "hole"
Spoo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|