ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 read barcodes
 New Topic  Reply to Topic
Author  Topic Next Topic  

skn

Germany
4 Posts

Posted - Sep 22 2021 :  03:33:54  Show Profile  Reply
I used the component TImageEnMView, where I've scanned some documents into it. Next action is to analyze the barcodes of each document. This action is only succesful at the first document. At the second document there happens an error. Must there something resetet?

some code:
m_symbols := IEVisionLib.createBarCodeScanner().scan(Bild.IEBitmap.GetIEVisionImage(), selRect);
for i := 0 to m_symbols.size() - 1 do
begin
bc := TIEVisionBarCodeSymbol( m_symbols.getObj(i) );
data := bc.getData().c_str();
mmoBC.Lines.Add(bc.getSymbolType().c_str() + ':' + bc.getData().c_str());

The error happens at .... bc.getData().... (at the second document!)



sk

xequte

6420 Posts

Posted - Sep 22 2021 :  20:10:13  Show Profile  Reply
So is Bild a TImageEnView? What method do you use to assign the image to the TImageEnView?

Can you give us the steps (or a simple demo) to reproduce at our end?


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

skn

Germany
4 Posts

Posted - Oct 10 2021 :  13:27:51  Show Profile  Reply
Hello Nigel,

sorry for answering your questions regarding my problem late (despite this i am very interested in the solution of the problem).
Yes - "Bild" is a TImageEnView.
On every Image in TImageEnMView I create a "Bild" and copy this Image to a TImageEnView
The code therefor is:

for j := 0 to imgENvwMLSScan.ImageCount - 1 do begin
Bild := TImageEnView.Create(self);
frmLSScan.imgENvwMLSScan.CopyToIEBitmap(frmLSScan.imgENvwMLSScan.SelectedImage, Bild.IO.IEBitmap);
....
The following lines are familiar to you.
....
Bild.Free;
m_symbols.clear;
end;


Thank you for your support.

Regards
S.Knoll

sk
Go to Top of Page

skn

Germany
4 Posts

Posted - Oct 10 2021 :  13:35:22  Show Profile  Reply
sorry ... I forgot to mention that I choose the image naturally in ..TImageEnMView with :

frmLSScan.imgENvwMLSScan.SelectImage(j);


sk
Go to Top of Page

xequte

6420 Posts

Posted - Oct 10 2021 :  18:23:50  Show Profile  Reply
Hi

Rather than creating a TImageEnView, can you try just using a TIEBitmap?

bmp := TIEBitmap.create();
for j := 0 to imgENvwMLSScan.ImageCount - 1 do 
begin
  frmLSScan.imgENvwMLSScan.CopyToIEBitmap( frmLSScan.imgENvwMLSScan.SelectedImage, bmp );
  ....
end;
bmp.Free();




Nigel
Xequte Software
www.imageen.com
Go to Top of Page

skn

Germany
4 Posts

Posted - Oct 20 2021 :  06:04:04  Show Profile  Reply
It works, Thank you very much.

sk
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
Jump To: