LEADTOOLS Support
Document
Document SDK Questions
No RefBitmap property in Barcode OCX control?
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, January 10, 2007 10:29:18 PM(UTC)
Groups: Registered
Posts: 30
Hi,
I use Leadtools v14.5 and I found that RefBitmap is missing from the AxLTBARLib.AxLEADBarCode.
Such that each time I need to do RasterImageConverter.ToLeadBitmap(Image, "LTKRN14N.DLL"), it spends time on allocating memory for the image. I guess reference memory without doing a memory copy will speed up the barcode reading process.
The help specify to use "RefBitmap" for referencing the image, what should I do now?
By the way, What function I need to call to free up the memory after barcode read?
Rgds,
Raymond
#2
Posted
:
Sunday, January 14, 2007 12:55:36 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Two copies must be created because you are using two
kernels (.Net and the OCX). So the memory copy must take place.
You can free the image after using it with the OCX
like this (this is C# code, but can be easily converted to VB.NET):
using Leadtools.Compatibility;
private void ToLeadBitmapTest(RasterImageViewer
viewer)
{
IntPtr
ocxBitmap = RasterImageConverter.ToLeadBitmap(viewer.Image,
"LTKRN14N.DLL");
// Do
something with ocxBitmap, for example, use LEADTOOLS COM objects to save it to
a file.
RasterImageConverter.FreeLeadBitmap(ocxBitmap,
"LTKRN14N.DLL");
System.Runtime.InteropServices.Marshal.FreeHGlobal(ocxBitmap);
}
LEADTOOLS Support
Document
Document SDK Questions
No RefBitmap property in Barcode OCX control?
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.