Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

97
Vistas
SVG Filter using feImage as input to feDisplacementMap

I am trying to use svg filters to add a displacement map to an image. This is my code:

<svg width="300" height="300">
    <filter id="a" filterUnits="userSpaceOnUse" x="0" y="0" width="300" height="300">
      <feImage xlink:href="https://i.imgur.com/TKNyL9Q.jpg" result="heatmap"/>
      <feDisplacementMap scale="15" xChannelSelector="R" yChannelSelector="G" in2="heatmap" in="SourceGraphic"/>
    </filter>
    <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/222579/beagle400.jpg" height="300" width="300" filter="url(#a)" />
  </svg>

This is supposed to take the beagle image and apply a grid displacement map to it but it has no effect.

Oddly, switching in with in2 in the <feDisplacementMap> tag does work but in reverse showing a grid image with a beagle map fine.

Here is a codepen example.

Why does it only work one way?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

it seems the in & in2 parameters need to match up with the source graphic itself not the .heatmap.

I amended the on the first: 'Beagle with heatmap filter' to this:

<feDisplacementMap scale="15" xChannelSelector="R" yChannelSelector="G" in2="SourceGraphic" in="SourceGraphic"/><!-- -->
    </filter>

Let me know if this is the result you was looking for?

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda