stil / gd-text

PHP class making it easy to type text on pictures. Supports multi-lined text, horizontal and vertical alignment.
400 stars 131 forks source link

Combine with intervention Images #25

Closed kouloughli-hemza closed 6 years ago

kouloughli-hemza commented 7 years ago

Hello , i was Trying to Make blur to image using intervention images then pass to gd text to add text was wonder if this possible and how to implement the two libraries to work together maybe to achieve what i want

stil commented 7 years ago

You can save image created with Intervetion and then load it in gd-text. Isn't it enough for your use case?

kouloughli-hemza commented 7 years ago

i did That , was thinking there is a method to combine the two , what i understand is that intervention images is Able to read result of gd text but gd text cannot do that ,

stil commented 7 years ago
$data = (string) Image::make('public/bar.png')->encode('png');
$im = imagecreatefromstring($data);
$textBox = new Box($im);

I have never used Intervention, but I think this code should work.