e01.org

in2

The in2 attribute identifies the second input for the given filter primitive. It works exactly like the in attribute.

The **`in2`** attribute identifies the second input for the given filter primitive. It works exactly like the in attribute.

You can use this attribute with the following SVG elements:

- feBlend
- feComposite
- feDisplacementMap

## feBlend

For feBlend, `in2` defines the second input image to the blending operation.

<table class="properties">
<tbody>
<tr>
<th scope="row">Value</th>
<td>
<code>SourceGraphic</code> | <code>SourceAlpha</code> |
<code>BackgroundImage</code> | <code>BackgroundAlpha</code> |
<code>FillPaint</code> | <code>StrokePaint</code> |
<code>&#x3C;filter-primitive-reference></code>
</td>
</tr>
<tr>
<th scope="row">Default value</th>
<td>
<code>SourceGraphic</code> for first filter primitive, otherwise result
of previous filter primitive
</td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>Yes</td>
</tr>
</tbody>
</table>

## feComposite

For feComposite, `in2` defines the second input image to the compositing operation.

<table class="properties">
<tbody>
<tr>
<th scope="row">Value</th>
<td>
<code>SourceGraphic</code> | <code>SourceAlpha</code> |
<code>BackgroundImage</code> | <code>BackgroundAlpha</code> |
<code>FillPaint</code> | <code>StrokePaint</code> |
<code>&#x3C;filter-primitive-reference></code>
</td>
</tr>
<tr>
<th scope="row">Default value</th>
<td>
<code>SourceGraphic</code> for first filter primitive, otherwise result
of previous filter primitive
</td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>Yes</td>
</tr>
</tbody>
</table>

## feDisplacementMap

For feDisplacementMap, `in2` defines the second input image, which is used to displace the pixels in the image defined in the in attribute.

<table class="properties">
<tbody>
<tr>
<th scope="row">Value</th>
<td>
<code>SourceGraphic</code> | <code>SourceAlpha</code> |
<code>BackgroundImage</code> | <code>BackgroundAlpha</code> |
<code>FillPaint</code> | <code>StrokePaint</code> |
<code>&#x3C;filter-primitive-reference></code>
</td>
</tr>
<tr>
<th scope="row">Default value</th>
<td>
<code>SourceGraphic</code> for first filter primitive, otherwise result
of previous filter primitive
</td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>Yes</td>
</tr>
</tbody>
</table>

## Specifications

source: MDN Web Docs mirror · page

Cite this

"in2". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/in2

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·