Added fix to support barcodes that have a black pixel at the very end of the canvas