LINUX.ORG.RU

Perl + Image::Imlib2 как можно вставить картинку в картинку?


0

0

Допустим есть картинка с обрамлением, а посередине белый фон. И есть картинка меньшего размера, подходящая по размеру и равную белому фону первой картинки.

Можно ли как вставить меньшую в большую картинку по указанным координатам используя Image::Imlib2 ?

★★★

blend (source_image, merge_alpha, sx, sy, sw, sh, dx, dy, dw, dh)

This will blend the source rectangle x, y, width, height from the source_image onto the current image at the destination x, y location scaled to the width and height specified. If merge_alpha is set to 1 it will also modify the destination image alpha channel, otherwise the destination alpha channel is left untouched.
$image->blend($cropped_image, 0, 0, 0, 50, 50, 200, 0, 50, 50);

iSage ★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.