Thanks Bashar.
I was able to generate Raster Image object in the memory. Now I need to stick this image inside <td> tag
Please help.
Here is my code..
Private Function CreateLeadBarcodeImage(ByVal sText As String, ByVal iBarcodeType As Integer) As RasterImage
Dim iWidth As Integer = 0
Dim iHeight As Integer = 0
Dim newImage As RasterImage
newImage = New RasterImage(RasterMemoryFlags.Managed, 400, _
400, 1, RasterByteOrder.Bgr, RasterViewPerspective.TopLeft, Nothing, Nothing)
Dim command As Leadtools.ImageProcessing.FillCommand = New Leadtools.ImageProcessing.FillCommand
command.Color = New Leadtools.RasterColor(255, 255, 255)
command.Run(newImage)
Dim objAxLEADBarCode As New LTBARLib.LEADBarCodeClass
'unlock support
RasterSupport.Unlock(RasterSupportType.Barcodes1d, "testkey")
objAxLEADBarCode.UnlockSupport(LTBARLib.tagSupportLockConstants.L_SUPPORT_BARCODES_1D, "testkey")
Dim nret As Integer
'Convert IRasterImage to LEAD OCX Image
Dim ocxbitmap As IntPtr = RasterImageConverter.ToLeadBitmap(newImage, "LTKRN14N.DLL")
objAxLEADBarCode.Bitmap = ocxbitmap.ToInt32()
Marshal.FreeHGlobal(ocxbitmap)
objAxLEADBarCode.Units = LTBARLib.tagBARCODE_UNITS.BARCODE_SCANLINES_PER_PIXELS
With objAxLEADBarCode.Linear
.EnableErrorCheck = True
.EnableWriteText = True
End With
'Write Barcode
nret = objAxLEADBarCode.Write(iBarcodeType, sText, 0, 0, 400, 65)
'Convert LEAD OCX Image to IRasterImage
newImage = RasterImageConverter.FromLeadBitmap(New IntPtr(objAxLEADBarCode.Bitmap), "LTKRN14N.DLL")
objAxLEADBarCode.Bitmap = 0
objAxLEADBarCode = Nothing
Return newImage
End Function
Thanks again
Valk