create lable image with php ans png
hello i need a script that shows af followering:
******************** ||||||BARCODE-1||||||
******************[ ][ NAME]
********LOGO******[170.50 kr. ]
********************
******************** ||||||||BARCODE-2||||||||
and this is the request for the script:
pic.php?info=BARCODE-1;170.50;BARCODE-1;NAME
BARCODE-1 can look like this = '1017035931'
BARCODE-2 can look like this = '5703302094214'
NAME can look like this = 'Fuga afbr. 2 polet HV'
Background = 'Black'
LOGO = 'Fill out the Left side'
170.50 kr. = 'Align Left' & 'Rotate 21 CW'
NAME = 'Align Right'
BARCODE-1 = 'White border' & 'height 100'
BARCODE-2 = 'White border' & 'height 50'
full size = '101x310'
the Whole lable must be rotated 90 CW
This what i got four now:
<?php
$exp = 'http://www.line-web.dk/als-el_vvs/service/images/logo90x270.png';
$barcode =
'http://line-web.dk/als-el_vvs/service/papir/barcodegen/html/image.php?filetype=PNG&dpi=72&scale=1&rotation=0&font_family=Arial.ttf&font_size=8&text='
. $_REQUEST['id'] . '&thickness=30&start=NULL&code=BCGcode128';
header ('Content-Type: image/png');
$im = imagecreatetruecolor(101, 310) or die('Cannot Initialize new GD
image stream');
// Barcode
$x = 60;
$y = 150;
$degrees = 270;
$per = imagecreate(302,7);
list($width, $height) = getimagesize($barcode);
$border_h = $height + 5;
$border_w = $width + 5;
$image = imagecreatefrompng($barcode);
$rotate = imagerotate($image, $degrees, 0);
imagerectangle($per, 0, 0, 301, 6, $border);
imagecopyresampled($im, $rotate, $x, $y, 0, 0, $height, 150, $height,
$width);
// EXP
$x = 1;
$y = $height + 5;
list($height, $width) = getimagesize($exp);
$image = imagecreatefrompng($exp);
$rotate = imagerotate($image, $degrees, 0);
imagecopyresampled($im, $rotate, $x, $y, 0, 0, $width, $height, $width,
$height);
imagepng($im);
imagedestroy($im);
?>
hope someone can help me make it fit. i an trying to create some kind of
Price lable.
No comments:
Post a Comment