Code Monkey home page Code Monkey logo

Comments (6)

tsayen avatar tsayen commented on May 22, 2024

that looks like a possibly nice feature, but there are too many different use cases. Should it be a text? Or an image watermark? There probably should be some parameters like position, orientation, opacity and so on. Can you elaborate?

from dom-to-image.

wideawakening avatar wideawakening commented on May 22, 2024

All what you state makes sense, but in our case we would go for image-type watermark

  • src (file would come handy)
  • x,y,width,height

thx for the consideration

from dom-to-image.

jtrod avatar jtrod commented on May 22, 2024

is it possible to add some feature like this:

https://www.youtube.com/watch?v=CRZst_Y_WoA

from dom-to-image.

cnatis avatar cnatis commented on May 22, 2024

I just wanted to add that #111 could be a solution for this too

from dom-to-image.

bizaybsnt avatar bizaybsnt commented on May 22, 2024

any update in this issue?? I can't use html2canvas since it doesn't render CSS properly in the image.

from dom-to-image.

tomzweb avatar tomzweb commented on May 22, 2024

If anyone's interested, there is a method you can add a watermark using a background image in the properties style object, however, the image url has to be base64.

E.g.

{
  style: {
    padding:'100px 40px 40px 40px',
    backgroundColor: '#000',
    backgroundPosition: 'center 30px',
    backgroundSize: '140px',
    backgroundRepeat: 'no-repeat',
    backgroundImage: 'url("data:image/png;base64,<base64>"'
  },
  height: html.offsetHeight + 160,
  width: html.offsetWidth + 80,
}

from dom-to-image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.