jeudi 29 août 2019

How to get image as a resource instead of string in php using Storage::get()

I am trying to give user the photo with desired background that are stored in my server with the text they want on it. But to edit the image on the fly using php , i need to retrieve my background image file as resource but i am getting the image as string instead.

I tried using Storage::get() function

$bg_image = Storage::disk('public')->get('background.png');
imagettftext($bg_image, 64, 10, 20, 20, $color, $font, $user_name);

but it threw me an error imagettftext() expects parameter 1 to be resource, string given



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/340Ibae
via IFTTT

Aucun commentaire:

Enregistrer un commentaire