setScale($scale); // Resolution $code->setThickness($thickness); // Thickness $code->setForegroundColor($color_black); // Color of bars $code->setBackgroundColor($color_white); // Color of spaces $code->setFont($font); // Font (or 0) $code->parse($text); // Text /* Here is the list of the arguments 1 - Filename (empty : display on screen) 2 - Background color */ $drawing =& new BCGDrawing($filename, $color_white); $drawing->setBarcode($code); $drawing->draw(); // Header that says it is an image (remove it if you save the barcode to a file) if (false) : header('Content-Type: image/png'); endif; // Draw (or save) the image into PNG format. $drawing->finish($drawing->IMG_FORMAT_PNG); // Manual scaling of the displayed image if ($imgWidth != "") : $imgWidth = " width=\"" . $imgWidth . "\" "; endif; if ($imgheight != "") : $imgheight = " height=\"" . $imgheight . "\" "; endif; if ($systemPath == "..") : $retVal = ""; else : $retVal = "" . $filename . "\" border=\"0\"" . $imgWidth . $imgheight . ">"; endif; endif; return $retVal; } ?>