<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=MaskTools%2FMaskedMerge</id>
	<title>MaskTools/MaskedMerge - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=MaskTools%2FMaskedMerge"/>
	<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=MaskTools/MaskedMerge&amp;action=history"/>
	<updated>2026-08-17T00:30:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=MaskTools/MaskedMerge&amp;diff=177&amp;oldid=prev</id>
		<title>Admin: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=MaskTools/MaskedMerge&amp;diff=177&amp;oldid=prev"/>
		<updated>2013-05-09T15:02:00Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{FilterCat|External_filters|Other_filters|Support_filters}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef|MaskedMerge (clip base_clip, clip overlay_clip, clip mask_clip) }}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Plugin&amp;#039;&amp;#039;&amp;#039;: [[MaskTools]]&lt;br /&gt;
&lt;br /&gt;
This filter applies the clip &amp;lt;tt&amp;gt;overlay_clip&amp;lt;/tt&amp;gt; on the clip &amp;lt;tt&amp;gt;base_clip&amp;lt;/tt&amp;gt;, considering the clip &amp;lt;tt&amp;gt;mask_clip&amp;lt;/tt&amp;gt;. More precisely, with bc, oc and  mc the values of three pixels taken respectively on &amp;lt;tt&amp;gt;base_clip&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;overlay_clip&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mask_clip&amp;lt;/tt&amp;gt;, the result will be :&lt;br /&gt;
&lt;br /&gt;
 v = ((256 - mc) * bc + mc * oc + 128) / 256&lt;br /&gt;
&lt;br /&gt;
128 is here in order to reduce the error due to the rounding of the integer division.&lt;br /&gt;
&lt;br /&gt;
So, if the mask is 255, the pixel will be the pixel from the &amp;lt;tt&amp;gt;overlay_clip&amp;lt;/tt&amp;gt;, if the mask is 0, the pixel will be from the &amp;lt;tt&amp;gt;base_clip&amp;lt;/tt&amp;gt;, and in between, it will be blended between both clips.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[MaskTools]].&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>