Я использую Vips для изменения размера изображений через Shrine, надеясь, что можно использовать библиотеку Vips для объединения слоя текста поверх изображения.
ImageProcessing::Vips.source(image).resize_to_fill!(width, height)
Этот код отлично работает, как я могу добавить слой текста после resize_to_fill?
Цель состоит в том, чтобы написать «Hello world» белым текстом с тенью текста CSS в центре изображения.
Я пытался написать что-то вроде этого, но пока получаю только ошибки:
Vips\Image::text('Hello world!', ['font' => 'sans 120', 'width' => $image->width - 100]);