ict:isbn
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ict:isbn [2021/02/08 16:53] – created hindiadmin | ict:isbn [2021/02/08 18:26] (current) – hindiadmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ISBN Tools ====== | ====== ISBN Tools ====== | ||
- | < | ||
- | //For displaying barcodes | ||
- | |||
- | //Arguments are: | ||
- | // code Number you want outputted as a barcode | ||
- | |||
- | //You can use this script in two ways: | ||
- | // From a webpage/PHP script | ||
- | // Directly in your web browser | ||
- | |||
- | //Outputs the code as a barcode, surrounded by an asterisk (as per standard) | ||
- | //Will only output numbers, text will appear as gaps | ||
- | //Image width is dynamic, depending on how much data there is | ||
- | |||
- | //Get the barcode font (called ' | ||
- | |||
- | header(" | ||
- | $file = " | ||
- | $im = imagecreatefrompng($file); | ||
- | $string = $_GET[' | ||
- | imagealphablending($im, | ||
- | imagesavealpha($im, | ||
- | |||
- | $black = imagecolorallocate($im, | ||
- | |||
- | $font_height=40; | ||
- | |||
- | $newwidth=((strlen($string)*20)+41); | ||
- | $thumb = imagecreatetruecolor($newwidth, | ||
- | |||
- | imagecopyresized($thumb, | ||
- | imagettftext($thumb, | ||
- | |||
- | //show the image | ||
- | imagepng($thumb); | ||
- | imagedestroy($thumb); | ||
- | ?></ | ||
ict/isbn.1612803214.txt.gz · Last modified: 2021/02/08 16:53 by hindiadmin