Image/Barcode
| From: | Alejandro Crosa | Date: | Sat, 16 Apr 2011 14:34:25 +0000 |
| Subject: | Image/Barcode | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-31063@lists.php.net to get a copy of this message | ||
Hi....
I want to add the value return by
require_once 'Image/Barcode.php';
Image_Barcode::draw($string, "code128", "gif");
to a variable and can see his value as image jpg, png or gif.
I try use some like this
<?php
header("Content-Type: image/png");
$im = @imagecreate(110, 20)
or die("Cannot Initialize new GD image stream");
$color_fondo = imagecolorallocate($im, 0, 0, 0);
$color_texto = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $color_texto);
imagepng($im);
imagedestroy($im);
?>
to can add the image of the codebar in the variable $im by replacing the text "A simple text
string" by the value return by draw(), but I can´t do it...
This is ok?
Thanks....
best regards
Alejandro