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

feat: Add APIs for watermarking images #55

Merged
merged 4 commits into from
Apr 9, 2018
Merged

feat: Add APIs for watermarking images #55

merged 4 commits into from
Apr 9, 2018

Conversation

mrkurt
Copy link
Member

@mrkurt mrkurt commented Apr 6, 2018

This adds image.overlayWith and image.extend, both useful for watermarking images.

Here's an example, it takes a picture of a hot air ballon, and puts the Fly logo on the bottom right corner (with a little bit of padding):

    const img = new Image(picture)
    const watermark = new Image(overlay)
    const meta = img.metadata()
    const wmeta = watermark.metadata()

    img.overlayWith(watermark, { gravity: Image.gravity.southeast })
    const img2 = await img.toBuffer()

1523045320306

@mrkurt mrkurt mentioned this pull request Apr 7, 2018
4 tasks
@mrkurt mrkurt merged commit 942ccea into master Apr 9, 2018
@mrkurt mrkurt deleted the image-overlay branch July 16, 2018 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant