Answers for "intervention image can't add text"

0

intervention image can't add text

$font = new \Intervention\Image\Gd\Font(urldecode($data['text_value']));
$font->valign('top');
$font->color('#'.$data['text_color']);
$font->file('./../app/fonts/'.$data['text_font'].'.ttf');
$font->size($data['text_size']);
$size = $font->getBoxSize();

$gdmanager = new ImageManager(array('driver' => 'gd'));

$image_text = $gdmanager->canvas( $size['width'], $size['height']);

$font->applyToImage($image_text);

$text_watermark = $manager->make($image_text->encode('data-url'));
$image->insert( $text_watermark->response('png'), getPositionName($data['text_position']), $data['text_padding'], $data['text_padding'] ); //this is the main image created earlier using make
Posted by: Guest on April-07-2021

Code answers related to "intervention image can't add text"

Browse Popular Code Answers by Language