Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

96
Visualizações
DOM to Image that has filter style

I wanna save div as image I try many way like use html2canvas and htmlshot and DOM to Image

but do not work correnty for filter style and also backgroundimage. I set background image from local url

my div that I want convert it to the image has this style: filter (blur - grayscale - sepia - brightness - invert - hue-rotate) and background-image

I use html2canvas like this:

div style

#root {
    background-image: url("wallpaper.jpg");
    background-size: 100% 100%;
    background-position: center;
    width: 355px;
    height: 355px;
    border-radius: 4px;
    margin-bottom: 5px;
    filter: invert(82%) blur(0.5px) grayscale(100%) sepia(1) 
            brightness(0.8) hue-rotate(180deg) saturate(2);
  }

JS code

 <script src="htmlcanvas.js"></script>
<script>
 html2canvas(document.getElementById("root")).then(function(canvas) {
    document.body.appendChild(canvas);
  });
</script>

and this is output:

output

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda