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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Reading barcodes ...

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
mauriciopt Posted - Nov 04 2019 : 07:56:55
Hi,

i have a function for reading barcodes on pages.
Below the code of reading part.
The strange is i need to read the barcode twice (AGSBarcode := ) with 2 different methods in order to avoid an error when exiting my function.
Using only first or second method will raise the error at the end of the function.

Can you explain me?
I'm using imgeen v8.0.1 and associated IEVision version.



var 
  IEVisionImage: TIEVisionImage;
  IEVISION_symbol: TIEVisionBase; // 2019-11-04 ... TIEVisionBarCodeSymbol;
  IEVisionWString: TIEVisionWString;
  IEVISION_selRect: TIEVisionRect;
  IEVISION_m_symbols: TIEVisionVectorObjRef;


          IEVisionImage := tmpIEBmp.GetIEVisionImage; 
          IEVISION_selRect := IEVisionRect(0, 0, tmpIEBmp.Width, tmpIEBmp.Height);
          IEVISION_m_symbols := IEVisionLib.createBarCodeScanner().scan(IEVisionImage, IEVISION_selRect);

          for n := 0 to IEVISION_m_symbols.size - 1 do
          begin
// FIRST METHOD 
            IEVISION_symbol := IEVISION_m_symbols.getObj(n);
            IEVisionWString := TIEVisionBarCodeSymbol(IEVISION_symbol).getData();
            AGSBarcode := IEVisionWString.c_str;

// SECOND METHOD 
            AGSBarcode := TIEVisionBarCodeSymbol( IEVISION_m_symbols.getObj(n) ).getData.c_str;

            if pos(cNumerisation_SeparPrefix, AGSBarcode) = 1 then
            begin
              if AGSBarcode = cNumerisation_SeparPage1
              then QrCodeNewDocDetecte := true       document
              else PageSeparationDetectee := true;   

              Break;
            end
            else
              AGSBarcode := '';
          end;


Regards,
Mauricio

Mauricio
http://sourceforge.net/projects/tcycomponents/
7   L A T E S T    R E P L I E S    (Newest First)
mauriciopt Posted - Nov 11 2019 : 14:18:27
Done (sent request download e-mail).
Thanks

Mauricio
http://sourceforge.net/projects/tcycomponents/
xequte Posted - Nov 08 2019 : 20:58:00
Hi Mauricio

Please email me to clarify your upgrade status.



Nigel
Xequte Software
www.imageen.com
mauriciopt Posted - Nov 07 2019 : 16:47:09
Maybe because i have a previous dll version i think.


Mauricio
http://sourceforge.net/projects/tcycomponents/
xequte Posted - Nov 05 2019 : 22:11:29
Hi

I tested it as follows:

procedure TMainForm.Button1Click(Sender: TObject);
var
  IEVisionImage: TIEVisionImage;
  IEVISION_symbol: TIEVisionBase;
  IEVisionWString: TIEVisionWString;
  IEVISION_selRect: TIEVisionRect;
  IEVISION_m_symbols: TIEVisionVectorObjRef;
  n: integer;
  AGSBarcode: string;
begin
  IEVisionImage := ImageEnView1.IEBitmap.GetIEVisionImage;
  IEVISION_selRect := IEVisionRect(0, 0, ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height);
  IEVISION_m_symbols := IEVisionLib.createBarCodeScanner().scan(IEVisionImage, IEVISION_selRect);

  Caption := '';

  for n := 0 to IEVISION_m_symbols.size - 1 do
  begin
    // FIRST METHOD
    IEVISION_symbol := IEVISION_m_symbols.getObj(n);
    IEVisionWString := TIEVisionBarCodeSymbol(IEVISION_symbol).getData();
    AGSBarcode := IEVisionWString.c_str;

    // SECOND METHOD
    // AGSBarcode := TIEVisionBarCodeSymbol( IEVISION_m_symbols.getObj(n) ).getData.c_str;

    Caption := Caption + AGSBarcode + ', '
  end;
end;


I tried commenting out both the first and/or second methods. I did not get any errors.



Nigel
Xequte Software
www.imageen.com
mauriciopt Posted - Nov 05 2019 : 12:03:37
I' m using DELPHI TOKYO and it appens in any tif file with BAR CODE.

Mauricio
http://sourceforge.net/projects/tcycomponents/
xequte Posted - Nov 04 2019 : 15:52:38
Hi Mauricio

Does it only happen with specific images? Can you send us some samples. What version of Delphi are you using?

Nigel
Xequte Software
www.imageen.com
mauriciopt Posted - Nov 04 2019 : 08:04:06
Note that i have the problem in different images for 2 years ...

Mauricio
http://sourceforge.net/projects/tcycomponents/