Home | About us | Overview | Softwares - Downloads | Evaluate | Order | Support | old forums | Contact | F.A.Q. | Documentations | Search | Sitemap

Chroma Keying

Example requests & Code samples for GdPicture ActiveX.

Chroma Keying

Postby kenknight on Tue Jul 15, 2008 3:47 am

Hi all,

Not sure if this is the right forum, however, I'm looking for an Image Library that can take a picture of an object in front of a green screen and replace the green screen with the picture of my choice. Does gdpicture support this?

THanks,
ken
kenknight
 
Posts: 7
Joined: Tue Jul 01, 2008 7:18 am

Re: Chroma Keying

Postby Loïc on Tue Jul 15, 2008 12:55 pm

Hi,

You can do that easily using the DrawImageTransparencyColorEx() method of the GdPicture Pro component:


Code: Select all
Dim nMainImage As Long
Dim nBackGroundImage As Long

nBackGroundImage = Imaging1.CreateImageFromFile("landscape.jpg") 'image to draw on red background
nMainImage = Imaging1.CreateImageFromFile("c:\main.jpg") 'image with Red background
Imaging1.SetNativeImage (nBackGroundImage)

Call Imaging1.DrawImageTransparencyColorEx(nMainImage, Green, 95, 0, 0, Imaging1.GetWidth, Imaging1.GetHeight)

Call Imaging1.SaveAsJPEG("output.jpg")

Call Imaging1.CloseImage(nMainImage)
Call Imaging1.CloseImage(nBackGroundImage)


Best regards,

Loïc
User avatar
Loïc
Site Admin
 
Posts: 1195
Joined: Tue Oct 17, 2006 11:48 pm
Location: France


Return to Example requests & Code samples

Who is online

Users browsing this forum: No registered users and 0 guests