Code Monkey home page Code Monkey logo

Comments (9)

vmikhav avatar vmikhav commented on May 21, 2024 2

I had the same issue. I added background-color: white; CSS rule to the image parent node and it helped.

from dom-to-image.

tsayen avatar tsayen commented on May 21, 2024

Hi! Thanks for reporting. I'll take a look at that. In the meantime, could you please post the problematic image itself?

from dom-to-image.

sdkcarlos avatar sdkcarlos commented on May 21, 2024

Hey tsayen, thanks for the quick answer ! I solve this issue quickly changing the format of the image (was .jpg so i create a new version with transparency [png]).

However, the original jpg image didn't have border and I don't know why appears a border

from dom-to-image.

tsayen avatar tsayen commented on May 21, 2024

The problem might also be because of the image scaling. Do you maybe set the image dimensions explicitly? I seem to recall some border-like artefacts showing on JPG as an effect of scaling.

from dom-to-image.

sdkcarlos avatar sdkcarlos commented on May 21, 2024

Yes, is a div which have a background image with explicit dimensions (height:100;width:100%;)

Thanks for the support

from dom-to-image.

tsayen avatar tsayen commented on May 21, 2024

Do you observe those borders in the original html or is it just the rendered image?

from dom-to-image.

tsayen avatar tsayen commented on May 21, 2024

I was trying to reproduce the issue with a test JPG image, but I can't (see here http://jsfiddle.net/tsayen/sark5r13/2/)
If the issue is still bothering you, maybe you send me an example image (just attach it to the comment) that is rendered wrong.
Or we can close this for now.
What do you say?

from dom-to-image.

tsayen avatar tsayen commented on May 21, 2024

closing this for now

from dom-to-image.

Heriberto-Juarez avatar Heriberto-Juarez commented on May 21, 2024

I had the same issue. I added background-color: white; CSS rule to the image parent node and it helped.

I had problems with borders appearing out of nowhere in different nodes (div, and textarea) and this solved it. Thanks

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.