davidscotttufts / php-barcode

Source code for the article "How To Create Barcodes in PHP" found at http://davidscotttufts.com/2009/03/31/how-to-create-barcodes-in-php/
MIT License
320 stars 307 forks source link

Extract class. Add method GetPngData. #10

Open ArturGoldyn opened 8 years ago

ArturGoldyn commented 8 years ago

Extract class - makes coding easier by encapsulating usable code in public static methods of class.

Add method GetPngData. Allows to obtain PNG data instead of immediately returning image to browser. You can obtain image using the following instructions:

$pngData = PhpBarcode::GetPngData($image); header('Content-type: image/png'); echo $pngData;

elminson commented 6 years ago

@ArturGoldyn I just follow your code and implement in my version of this code as a composer library you can found it here https://github.com/elminson/barcode https://packagist.org/packages/elminson/barcode

Thanks yourr your code. feel free to comment