X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;ds=sidebyside;f=lib%2FBarcode.class.php;h=b75f2ba9a91031812f65813c5eab839117e87133;hb=HEAD;hp=6b2ed5613bbf66a3b1adb3c1fb4e98eff132205e;hpb=c6712080cfa133be17ae8e6ee18d7d009766978c;p=mirrors%2FSokoMan.git diff --git a/lib/Barcode.class.php b/lib/Barcode.class.php index 6b2ed56..b75f2ba 100755 --- a/lib/Barcode.class.php +++ b/lib/Barcode.class.php @@ -37,7 +37,7 @@ class Barcode { static function generate_barcode($string='EXAMPLE', $convert='png', $enctype='code128b') { $string = escapeshellarg($string); $enctype = escapeshellarg($enctype); - $convert = $convert ? " | convert - -crop 0x60+0+30\\! -background white -flatten $convert:-" : ''; + $convert = $convert ? " | convert - -crop 0x60+0+30\\! -background none -flatten $convert:-" : ''; return shell_exec("barcode -e $enctype -E -b $string$convert"); } @@ -55,6 +55,7 @@ class Barcode { header('Content-Type: image/png'); header('Cache-Control: max-age=604800, public'); //1week caching } else die(); + error_reporting(0); //TODO: enable errors again die(self::cached_barcode($string,$convert,$enctype)); } }