Skip to content

Extract class. Add method GetPngData.#10

Open
ArturGoldyn wants to merge 1 commit intodavidscotttufts:masterfrom
ArturGoldyn:master
Open

Extract class. Add method GetPngData.#10
ArturGoldyn wants to merge 1 commit intodavidscotttufts:masterfrom
ArturGoldyn:master

Conversation

@ArturGoldyn
Copy link

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;

Add method GetPngData.
@elminson
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants