Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example/watermark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ text = (text * 0.3):cast("uchar")
text = text:gravity("centre", 200, 200)
-- this block of pixels will be reused many times ... make a copy
text = text:copy_memory()
text = text:replicate(1 + im:width() // text:width(),
1 + im:height() // text:height())
text = text:replicate(1 + math.floor(im:width() / text:width()),
1 + math.floor(im:height() / text:height()))
text = text:crop(0, 0, im:width(), im:height())

-- we make a constant colour image and attach the text mask as the alpha
Expand Down