Main Menu

All times are in GMT -8 (DST) :: The time is now 4:39 pm.

Login or Register
Create an account and register your LMI products to gain access to useful resources.

Register Account

Login

Sub Menu

Knowledge Base
Article Data
Article Ref
7487-EUIV-5739
Date Created
Mon, 18th Jul 2011
Date Modified
Mon, 6th Mar 2017

   How to create images in a HSDataBase without using the AcquisitionDevice in VB.NET

Question 

How can I create images in a HSDataBase without using the AcquisitionDevice in  VB.NET?

Answer 

Dim lDB As HSCLASSLIBRARYLib.HSDatabase

lDB = mApplicationControl.Database

 

Dim i As Integer

Dim j As Integer

 

Dim lImage1 As HSCLASSLIBRARYLib.HSImage

lDB.AddView("Import View")

lImage1 = lDB.AddImage("Import View", "Import", HSCLASSLIBRARYLib.hsImageType.hsImage32bppRgb)

lImage1.Width = 10

lImage1.Height = 10

 

For i = 0 To 9

     For j = 0 To 9

           lImage1.Pixel(i, j) = 8421504

           If i = j Then lImage1.Pixel(i, j) = 16711680

     Next

Next