Repository navigation
Expand file tree
/
Copy pathtest.php
More file actions
63 lines (54 loc) · 1.75 KB
/
Copy pathtest.php
File metadata and controls
63 lines (54 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
$font = file_get_contents("http://mova.ppg.br/resources/blackholeframe/app/webroot/fonts/Arial.ttf");
file_put_contents("arial.ttf", $font);
//BANNER 01
$x = '1366';
$y = '400';
$im = imagecreatetruecolor($x, $y);
$gray = imagecolorallocate($im, 180, 180, 180);
$white = imagecolorallocate($im, 255, 255, 255);
imagefill($im, 0, 0, $gray);
$text = 'Slide 01';
imagettftext($im, 36, 0, 600, 220, $white, 'arial.ttf', $text);
imagejpeg($im, 'banner-01.jpg');
//BANNER 02
$x = '1366';
$y = '400';
$im = imagecreatetruecolor($x, $y);
$gray = imagecolorallocate($im, 180, 180, 180);
$white = imagecolorallocate($im, 255, 255, 255);
imagefill($im, 0, 0, $gray);
$text = 'Slide 02';
imagettftext($im, 36, 0, 600, 220, $white, 'arial.ttf', $text);
imagejpeg($im, 'banner-02.jpg');
//ITEM 01
$x = '400';
$y = '400';
$im = imagecreatetruecolor($x, $y);
$gray = imagecolorallocate($im, 80, 80, 80);
$white = imagecolorallocate($im, 180, 180, 180);
imagefill($im, 0, 0, $gray);
$text = 'Item 01';
imagettftext($im, 36, 0, 130, 210, $white, 'arial.ttf', $text);
imagejpeg($im, 'item-01.jpg');
//ITEM 01
$x = '400';
$y = '400';
$im = imagecreatetruecolor($x, $y);
$gray = imagecolorallocate($im, 80, 80, 80);
$white = imagecolorallocate($im, 180, 180, 180);
imagefill($im, 0, 0, $gray);
$text = 'Item 02';
imagettftext($im, 36, 0, 130, 210, $white, 'arial.ttf', $text);
imagejpeg($im, 'item-02.jpg');
//LOGO
$x = '180';
$y = '50';
$im = imagecreatetruecolor($x, $y);
$gray = imagecolorallocate($im, 255, 255, 255);
$white = imagecolorallocate($im, 0, 0, 0);
imagefill($im, 0, 0, $gray);
$text = 'LOGO';
imagettftext($im, 46, 0, 2, 47, $white, 'arial.ttf', $text);
imagejpeg($im, 'logo.jpg');
?>