I have a few review comments that need to be addressed before I include this:
* Is this your original work that you're releasing under the LGPL?
* For consistency with other interfaces, the initial-cap prefix of the library should be "ZBar", not "Zbar"
* What is the purpose of the ZBAR_BARCODES array? What additional functionality is introduced over zbar_get_symbol_name? This list should at least be populated using zbar_get_symbol_name, to avoid introducing inconsistencies.
* The ZBarBarcode procedure is too tightly integrated with application specifics to be included with the library. I suggest splitting out the reusable functionality and removing the monolithic API. eg, a function to read a TIFF file and return a ZBarImage would be a useful addition.
There are also a few areas I would like to see enhanced, if not now, then in a future patch:
* I am unable to compile these bindings with FPC - is this expected? I am loathe to unnecessarily require a specific proprietary compiler (note that FPC did compile after some quick hacking...)
* These bindings introduce Windows specific calls, unnecessarily tying the cross-platform library to a specific platform. A few compiler directives should fix this.
* The ZBar library uses an object oriented design. Given the availability of object oriented Pascal, it would make sense if the OOP layer was also ported
* It would be nice if we had a basic test case to verify that the compiled unit is functional
Thanks for contributing this!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a working example, although I had to modify the code a bit
(basically, I don't have the DLL96V1, DLLSP96 the author put in the uses clause, so I've had to remove the following methods from the unit:
function zbar_image_scanner_parse_config
function zbar_decoder_parse_config
procedure ZbarBarcode
)
But it stil has a problem I couldn't solve: I get an access violation error when destroying the image in the function 'zbar_image_free_data'
Here is the code, compiled in Borland Delphi 7 Studio and ready to run. Hope it serves you well: http://www.mediafire.com/?addn2zzydmj
If by any chance you find why I get the access violation error, please, let me know.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All right, problem solved, I did not set the cleanup function in the zbar_image_set_data, I freed the data from the stream object instead.
I still get a minor memory leak when reading QR codes(as far as I know, there are no leaks with EAN-13 or with no code at all), and i'm almost sure it's a bug in the library.
Thanks c4pu110. I have not yet been able to run your example, I will try again later.
btw- do you have the experience to update the bindings as described below so I can include this in the library? If I have to make the changes myself, it's going to be awhile before I can get to it...
> memory leak when reading QR codes
This bug is fixed in hg (rev a27e17b2bdd3). Fix should be available with the next release
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll give it a try, but I can't promise anything (less than 3 months of experience with Delphi, and mainly as a bugfixer).
btw, these libraries are better than the commercial stuff I've tried until now, good work!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
你好,我来自中国,我需要你的帮助!
Hello, I come from China, I need your help!
Last edit: Anonymous 2016-06-22
I have a few review comments that need to be addressed before I include this:
* Is this your original work that you're releasing under the LGPL?
* For consistency with other interfaces, the initial-cap prefix of the library should be "ZBar", not "Zbar"
* What is the purpose of the ZBAR_BARCODES array? What additional functionality is introduced over zbar_get_symbol_name? This list should at least be populated using zbar_get_symbol_name, to avoid introducing inconsistencies.
* The ZBarBarcode procedure is too tightly integrated with application specifics to be included with the library. I suggest splitting out the reusable functionality and removing the monolithic API. eg, a function to read a TIFF file and return a ZBarImage would be a useful addition.
There are also a few areas I would like to see enhanced, if not now, then in a future patch:
* I am unable to compile these bindings with FPC - is this expected? I am loathe to unnecessarily require a specific proprietary compiler (note that FPC did compile after some quick hacking...)
* These bindings introduce Windows specific calls, unnecessarily tying the cross-platform library to a specific platform. A few compiler directives should fix this.
* The ZBar library uses an object oriented design. Given the availability of object oriented Pascal, it would make sense if the OOP layer was also ported
* It would be nice if we had a basic test case to verify that the compiled unit is functional
Thanks for contributing this!
I have a working example, although I had to modify the code a bit
(basically, I don't have the DLL96V1, DLLSP96 the author put in the uses clause, so I've had to remove the following methods from the unit:
function zbar_image_scanner_parse_config
function zbar_decoder_parse_config
procedure ZbarBarcode
)
But it stil has a problem I couldn't solve: I get an access violation error when destroying the image in the function 'zbar_image_free_data'
Here is the code, compiled in Borland Delphi 7 Studio and ready to run. Hope it serves you well: http://www.mediafire.com/?addn2zzydmj
If by any chance you find why I get the access violation error, please, let me know.
DLL96V1, DLLSP96 come from ImageLib Corporate Suite. Just get the lib.
All right, problem solved, I did not set the cleanup function in the zbar_image_set_data, I freed the data from the stream object instead.
I still get a minor memory leak when reading QR codes(as far as I know, there are no leaks with EAN-13 or with no code at all), and i'm almost sure it's a bug in the library.
Here's the code:
http://www.mediafire.com/?zdva4zowmzl
same as below, but better :D
Thanks c4pu110. I have not yet been able to run your example, I will try again later.
btw- do you have the experience to update the bindings as described below so I can include this in the library? If I have to make the changes myself, it's going to be awhile before I can get to it...
> memory leak when reading QR codes
This bug is fixed in hg (rev a27e17b2bdd3). Fix should be available with the next release
I'll give it a try, but I can't promise anything (less than 3 months of experience with Delphi, and mainly as a bugfixer).
btw, these libraries are better than the commercial stuff I've tried until now, good work!
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).