[zbar-commits] push rev [305]: iPhone: fix readertest max quality result filtering
Status: Beta
Brought to you by:
spadix
|
From: <sp...@us...> - 2011-05-02 22:48:38
|
changeset: 305:97445b5d3600 user: sp...@us... date: Mon May 02 15:48:06 2011 -0700 details: http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbarzbar/rev/97445b5d3600 description: iPhone: fix readertest max quality result filtering - thanks to John Boydon for finding this! diffstat: iphone/ChangeLog | 2 ++ iphone/examples/readertest/readertest.m | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diffs (29 lines): diff -r 35188a0ddd82 -r 97445b5d3600 iphone/ChangeLog --- a/iphone/ChangeLog Mon May 02 15:32:28 2011 -0700 +++ b/iphone/ChangeLog Mon May 02 15:48:06 2011 -0700 @@ -1,4 +1,6 @@ current: + * fix readertest max quality result filtering + - thanks to John Boydon for finding this! * improve support for resizing, rotating and embedding the reader * add readertest fixed zoom stops * add manual frame capture diff -r 35188a0ddd82 -r 97445b5d3600 iphone/examples/readertest/readertest.m --- a/iphone/examples/readertest/readertest.m Mon May 02 15:32:28 2011 -0700 +++ b/iphone/examples/readertest/readertest.m Mon May 02 15:48:06 2011 -0700 @@ -844,9 +844,13 @@ int quality = 0; ZBarSymbol *bestResult = nil; - for(ZBarSymbol *sym in results) - if(sym.quality > quality) + for(ZBarSymbol *sym in results) { + int q = sym.quality; + if(quality < q) { + quality = q; bestResult = sym; + } + } [self performSelector: @selector(presentResult:) withObject: bestResult |