Регулировка размера мозаичного изображения - PullRequest
0 голосов
/ 09 апреля 2020

Рассмотрим следующую команду composite:

composite -dissolve 50% -tile overlay.png base.png out.png

Эта плитка overlay.png более base.png.

Как масштабировать размер изображения до плитки до мозаичного изображения, кроме отдельной команды?

1 Ответ

2 голосов
/ 10 апреля 2020

Вы можете сделать это в ImageMagick, но вам нужно использовать синтаксис преобразования, и он более сложный.

Ввод:

enter image description here

Черепица:

enter image description here

# read the input
# resize the tiling image and save to mpr: (in memory) format
# copy the input and tile over it with the resized tiling image
# do the dissolve
# save the output

convert lena.png \
\( tile_water.jpg -resize 50% -write mpr:tile +delete \) \
\( -clone 0 -tile mpr:tile -draw "color 0,0 reset" \) \
-define compose:args=50 -compose dissolve -composite \
lena_tiled.png


Результат:

enter image description here

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...