Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix watermark example in LuaJIT #63

Merged
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
Loading