O
O
Oleg Voitenko2021-06-12 20:22:12
PHP
Oleg Voitenko, 2021-06-12 20:22:12

How to stretch text on an image, taking into account the curves of ImageMagick?

Good day to all! There is an image with a T-shirt in two versions - normal visibility and UV spectrum. You need to overlay a picture with text on a football block so that the inscription repeats all the curves of the shirt using ImageMagick.

Tried like this:

convert ./tmp/tmptext.jpg ./tmp/shirt_uv.png -fx p{u[0].w*v.r,u[0].h*v.g} ./tmp/shirt.png -compose HardLight -composite tmp/shirt.png -alpha off -compose CopyOpacity -composite ./tmp/out.png'


I think it's a problem with -fx, as the text image is stretched to cover the whole thing in ./tmp/shirt.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question