Oprava prevodu z PS do PNG pro novejsi verzi GNU barcode
[mirrors/SokoMan.git] / lib / Barcode.class.php
index 6b2ed5613bbf66a3b1adb3c1fb4e98eff132205e..b75f2ba9a91031812f65813c5eab839117e87133 100755 (executable)
@@ -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));
        }
 }
This page took 0.090709 seconds and 4 git commands to generate.