c++ port of r2592

git-svn-id: http://zxing.googlecode.com/svn/trunk@2626 59b500cc-1b3d-0410-9834-0bbf25fbcc57
c++ port of r2595

git-svn-id: http://zxing.googlecode.com/svn/trunk@2627 59b500cc-1b3d-0410-9834-0bbf25fbcc57