Renault Scenic E-Tech EV - PV-Output - 48kWh LiFePo4 op 15kVa Victron systeem
Ik doe dat zelf op de volgende manier:
Beetje kort-door-de-bocht maar het werkt wel.
Ooh er zit ook een extra functie in waarmee je tekst leesbaarder kan maken als je het op een foto plaatst (die kun je natuurlijk er wel uithalen).
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| function imagestring2($image_resource, $dest_text, $x, $y, $border, $back_color, $front_color, $font_nr) { imagestring ($image_resource, $font_nr, $x - $border, $y - $border, $dest_text, $back_color); imagestring ($image_resource, $font_nr, $x + $border, $y - $border, $dest_text, $back_color); imagestring ($image_resource, $font_nr, $x - $border, $y + $border, $dest_text, $back_color); imagestring ($image_resource, $font_nr, $x + $border, $y + $border, $dest_text, $back_color); imagestring ($image_resource, $font_nr, $x - $border, $y, $dest_text, $back_color); imagestring ($image_resource, $font_nr, $x + $border, $y, $dest_text, $back_color); imagestring ($image_resource, $font_nr, $x, $y + $border, $dest_text, $back_color); imagestring ($image_resource, $font_nr, $x, $y - $border, $dest_text, $back_color); imagestring ($image_resource, $font_nr, $x, $y, $dest_text, $front_color); }; imagestring2($dest, substr($dest_text,0,8), 2,12,1,$text_backcolor, $text_frontcolor, 3); imagestring2($dest, substr($dest_text,8,16), 2,22,1,$text_backcolor, $text_frontcolor, 3); imagestring2($dest, substr($dest_text,16,24), 2,32,1,$text_backcolor, $text_frontcolor, 3); imagestring2($dest, substr($dest_text,24,32), 2,32,1,$text_backcolor, $text_frontcolor, 3); |
Beetje kort-door-de-bocht maar het werkt wel.
Ooh er zit ook een extra functie in waarmee je tekst leesbaarder kan maken als je het op een foto plaatst (die kun je natuurlijk er wel uithalen).
Okee dan!!
Het is voor elkaar!!!
Harstikke bedankt!
Het is voor elkaar!!!
Harstikke bedankt!
Renault Scenic E-Tech EV - PV-Output - 48kWh LiFePo4 op 15kVa Victron systeem
In de PHP manual staat de functie die je zoekt:
code:
1 2 3 resource imagestringbox ( resource image, int font, int left, int top, int right, int bottom, int align, int valign, int leading, string text, int color )
This function allows you to draw text inside a box. It will automatically wrap at the end of the line and cut the text if it is further than the bottom line. The text can be aligned vertically and horizontally. Manual new lines can be made by using \n (note that you can not escape that symbol though). The space between lines can also be set using leading (negative values are accepted).