This file is indexed.

/usr/share/doc/libafterimage-dev/html/blender.html is in libafterimage-dev 2.2.12-11.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>ASImage Blending</title>
<style type="text/css">
	<!--

	body {
        	margin-top: 5px;
		background-repeat: repeat;
	}

	.copy {
		margin-top: 10px;
        	margin-left: 4%;
        	margin-right: 4%;
	}

	.copy a:link, .copy a:visited {
        	color:#0FF;
        	text-decoration:none
	}

	.copy a:active, .copy a:hover {
        	color:#FC3;
        	text-decoration:underline
	}

	.copy2 {
		margin-top: 10px;
        	margin-left: 0;
        	margin-right: 0;
	}

	.copy2 a:link, .copy a:visited {
        	color:#0FF;
        	text-decoration:none
	}

	.copy2 a:active, .copy a:hover {
        	color:#FC3;
        	text-decoration:underline
	}

	p.codeBlock {
		background: #444444;
		padding: 1em;
		margin-left: 4em;
		font-family:Tahoma, Arial, Verdana, Helvetica;
		font-size:14px;
	}
	.container {
		padding: -1em;
		margin-left: 0em;
		margin-right: 1em;
		width: 100%;
		background: #ccc;
		border: 1px solid #000;
		font-size:13px;
	}
	p.dense {
		text-align: justify;
		margin-top: 0em;
		padding: 0em;
		line-height: 110%;
	}			       
	p.sect_header
	{
    		background-color: #dddddd;
    		color: #000000;
    		text-align: right;
    		font-size: 11pt;
	}
	p.refsect_header
	{
    		text-align: left;
    		font-size: 14px;
		line-height: 90%;
	}
	dl.dense {
		padding: 0;
		margin: 0;
		font-size:14px;
	}
	ul.dense {
	}
	li.dense {
		line-height: 110%;
	}
	dt.dense {
		line-height: 110%;
		text-align: bottom;
	}
	dd.dense {
		font-size:14px;
	}
	-->
</style>

</head>
<body>
<A name="page_top"></A>
<A href="../../afterstep/html/preface.html">Preface</A>&nbsp;&nbsp;<A href="../../afterstep/html/visualselect.html">Introduction</A>&nbsp;&nbsp;<A href="../../afterstep/html/index.html">Main index</A>&nbsp;&nbsp;<A href="index.html">API Topic index</A>&nbsp;&nbsp;<A href="Glossary.html">API Glossary</A><p>
<h1>ASImage Blending</h1><font size=4>functionality for blending of image data using diofferent algorithms</font><hr>

<A NAME="libAfterImage/blender.h"><UL><p class="sect_header"><B>libAfterImage/blender.h</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="blender"></A><B>blender</B><P class="dense"></P></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>Defines implemented methods for ASScanline combining, that could
be passed to merge_layers() via <A href="asimage.html#ASImageLayer">ASImageLayer</A> structure.
Also includes functions for <A href="blender.html#colorspace">colorspace</A> conversion RGB&lt;-&gt;HSV and
RGB&lt;-&gt;HLS.
</PRE></LI><LI><p class="refsect_header"><B>SEE ALSO</B></p><PRE>Functions :
   Colorspace conversion :
         rgb2value(), rgb2saturation(), rgb2hue(), rgb2luminance(),
         rgb2hsv(), rgb2hls(), hsv2rgb(), hls2rgb().

   merge_scanline methods :
         alphablend_scanlines(), allanon_scanlines(),
         tint_scanlines(), add_scanlines(), sub_scanlines(),
         diff_scanlines(), darken_scanlines(), lighten_scanlines(),
         screen_scanlines(), overlay_scanlines(), hue_scanlines(),
         saturate_scanlines(), value_scanlines(),
         colorize_scanlines(), dissipate_scanlines().

   useful merging function name to function translator :
         blend_scanlines_name2func()

Other <A href="afterimage.html#libAfterImage">libAfterImage</A> modules :
         <A href="ascmap.html#ascmap">ascmap</A>.h <A href="asfont.html#asfont">asfont</A>.h <A href="asimage.html#asimage">asimage</A>.h <A href="asvisual.html#asvisual">asvisual</A>.h <A href="blender.html#blender">blender</A>.h <A href="export.html#export">export</A>.h
         <A href="import.html#import">import</A>.h <A href="transform.html#transform">transform</A>.h <A href="ximage.html#ximage">ximage</A>.h
</PRE></LI><LI><p class="refsect_header"><B>AUTHOR</B></p><PRE>Sasha Vasko &lt;sasha at aftercode dot net&gt;
</PRE></LI></UL>
<A NAME="libAfterImage/colorspace"><UL><p class="sect_header"><B>libAfterImage/colorspace</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="colorspace"></A><B>colorspace</B><P class="dense"></P></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>RGB <A href="blender.html#colorspace">colorspace</A>: each <A href="asimagexml.html#color">color</A> is represented as a combination of
red, green and blue values. Each <A href="blender.html#value_scanlines()">value</A> can be in 2 formats :
8 bit and 24.8 bit. 24.8 bit makes for 32bit <A href="blender.html#value_scanlines()">value</A> with lower 8 bits
used as a fraction for better calculation precision.

HSV <A href="blender.html#colorspace">colorspace</A>: each <A href="asimagexml.html#color">color</A> is represented as a combination of
<A href="blender.html#hue_scanlines()">hue</A>, saturation and <A href="blender.html#value_scanlines()">value</A>. Hue is generally colorizing component where
<A href="blender.html#value_scanlines()">value</A> represents brightness.

HLS <A href="blender.html#colorspace">colorspace</A>: each <A href="asimagexml.html#color">color</A> is represented as a combination of
<A href="blender.html#hue_scanlines()">hue</A>, luminance and saturation. It is analogous to HSV with <A href="blender.html#value_scanlines()">value</A>
substituted by luminance, except that luminance could be both
negative and positive.

alpha channel could be added to any of the above colorspaces. alpha
channel is generally used to define transparentness of the <A href="asimagexml.html#color">color</A>.
<A href="afterimage.html#libAfterImage">libAfterImage</A> is using ARGB <A href="blender.html#colorspace">colorspace</A> as a base <A href="blender.html#colorspace">colorspace</A>, and
represents most colors as <A href="asvisual.html#ARGB32">ARGB32</A> values or ASScanline scanlines of
pixels.
</PRE></LI></UL>
<A NAME="libAfterImage/rgb2value()"><UL><p class="sect_header"><B>libAfterImage/rgb2value()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="rgb2value()"></A><B>rgb2value()</B><P class="dense"></P>
<A NAME="rgb2saturation()"></A><B>rgb2saturation()</B><P class="dense"></P>
<A NAME="rgb2hue()"></A><B>rgb2hue()</B><P class="dense"></P>
<A NAME="rgb2luminance()"></A><B>rgb2luminance()</B><P class="dense"></P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE>CARD32 rgb2value( CARD32 red, CARD32 green, CARD32 blue );
CARD32 rgb2saturation( CARD32 red, CARD32 green, CARD32 blue );
CARD32 rgb2hue( CARD32 red, CARD32 green, CARD32 blue );
CARD32 <A href="blender.html#rgb2luminance()">rgb2luminance</A> (CARD32 red, CARD32 green, CARD32 blue );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>red</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent red channel
</DD><DT class="dense"><B>green</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent green channel
</DD><DT class="dense"><B>blue</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent blue channel
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent <A href="blender.html#value_scanlines()">value</A>, saturation, <A href="blender.html#hue_scanlines()">hue</A>,
or luminance respectively.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>This functions translate RGB <A href="asimagexml.html#color">color</A> into respective coordinates of
HSV and HLS colorspaces.
Returned <A href="blender.html#hue_scanlines()">hue</A> values are in 16bit format. To translate it to and from
conventional 0-360 degree range, please use :
degrees2hue16() - converts conventional <A href="blender.html#hue_scanlines()">hue</A> in 0-360 range into hue16
hue162degree()  - converts 16bit <A href="blender.html#hue_scanlines()">hue</A> <A href="blender.html#value_scanlines()">value</A> into conventional degrees.
</PRE></LI></UL>
<A NAME="libAfterImage/rgb2hsv()"><UL><p class="sect_header"><B>libAfterImage/rgb2hsv()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="rgb2hsv()"></A><B>rgb2hsv()</B><P class="dense"></P>
<A NAME="rgb2hls()"></A><B>rgb2hls()</B><P class="dense"></P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE>CARD32 rgb2hsv( CARD32 red, CARD32 green, CARD32 blue,
                CARD32 *saturation, CARD32 *<A href="blender.html#value_scanlines()">value</A> );
CARD32 rgb2hls( CARD32 red, CARD32 green, CARD32 blue,
                CARD32 *luminance, CARD32 *saturation );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>red</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent red channel
</DD><DT class="dense"><B>green</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent green channel
</DD><DT class="dense"><B>blue</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent blue channel
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent <A href="blender.html#hue_scanlines()">hue</A>.
32bit <A href="blender.html#value_scanlines()">value</A> pointed to by luminance, <A href="blender.html#value_scanlines()">value</A> and saturation will be <A href="asimagexml.html#set">set</A>
respectively to <A href="asimagexml.html#color">color</A> luminance, <A href="blender.html#value_scanlines()">value</A> and saturation.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>This functions translate RGB <A href="asimagexml.html#color">color</A> into full <A href="asimagexml.html#set">set</A> of HSV and HLS
coordinates at once. These functions work faster then separate
translation into each channel.
</PRE></LI></UL>
<A NAME="libAfterImage/hsv2rgb()"><UL><p class="sect_header"><B>libAfterImage/hsv2rgb()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="hsv2rgb()"></A><B>hsv2rgb()</B><P class="dense"></P>
<A NAME="hls2rgb()"></A><B>hls2rgb()</B><P class="dense"></P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE>void hsv2rgb( CARD32 <A href="blender.html#hue_scanlines()">hue</A>, CARD32 saturation, CARD32 <A href="blender.html#value_scanlines()">value</A>,
              CARD32 *red, CARD32 *green, CARD32 *blue);
void hls2rgb( CARD32 <A href="blender.html#hue_scanlines()">hue</A>, CARD32 luminance, CARD32 saturation,
              CARD32 *red, CARD32 *green, CARD32 *blue);
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>hue</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent <A href="blender.html#hue_scanlines()">hue</A>.
</DD><DT class="dense"><B>saturation</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent saturation.
</DD><DT class="dense"><B>value</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent <A href="blender.html#value_scanlines()">value</A>.
</DD><DT class="dense"><B>luminance</B></DT><DD class="dense">- 32 bit <A href="blender.html#value_scanlines()">value</A>, 16 lower bits of which represent luminance.
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>32bit <A href="blender.html#value_scanlines()">value</A> pointed to by red, green and blue will be <A href="asimagexml.html#set">set</A>
respectively to RGB <A href="asimagexml.html#color">color</A> channels.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>This functions performs reverse translation from HSV and HSL to
RGB <A href="asimagexml.html#color">color</A>
</PRE></LI></UL>
<A NAME="libAfterImage/merge_scanline"><UL><p class="sect_header"><B>libAfterImage/merge_scanline</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="alphablend_scanlines()"></A><B>alphablend_scanlines()</B><P class="dense">- combines top and bottom RGB components based
                       on alpha channel <A href="blender.html#value_scanlines()">value</A>:
                       bottom = bottom*(255-top_alpha)+top*top_alpha;
</P>
<A NAME="allanon_scanlines()"></A><B>allanon_scanlines()</B><P class="dense">- averages each pixel between two scanlines.
                       This method has been first implemented by
                       Ethan Fisher aka <A href="blender.html#allanon_scanlines()">allanon</A> as mode 130:
                       bottom = (bottom+top)/2;
</P>
<A NAME="tint_scanlines()"></A><B>tint_scanlines()</B><P class="dense">- tints bottom scanline with top scanline( with
                       saturation to prevent overflow) :
                       bottom = (bottom*(top/2))/32768;
</P>
<A NAME="add_scanlines()"></A><B>add_scanlines()</B><P class="dense">- adds top scanline to bottom scanline with
                       saturation to prevent overflow:
                       bottom = bottom+top;
</P>
<A NAME="sub_scanlines()"></A><B>sub_scanlines()</B><P class="dense">- substrates top scanline from bottom scanline
                       with saturation to prevent overflow:
                       bottom = bottom-top;
</P>
<A NAME="diff_scanlines()"></A><B>diff_scanlines()</B><P class="dense">- for each pixel calculates absolute difference
                       between bottom and top <A href="asimagexml.html#color">color</A> <A href="blender.html#value_scanlines()">value</A> :
                       bottom = (bottom&gt;top)?bottom-top:top-bottom;
</P>
<A NAME="darken_scanlines()"></A><B>darken_scanlines()</B><P class="dense">- substitutes each pixel with minimum <A href="asimagexml.html#color">color</A>
                       <A href="blender.html#value_scanlines()">value</A> of top and bottom :
                       bottom = (bottom&gt;top)?top:bottom;
</P>
<A NAME="lighten_scanlines()"></A><B>lighten_scanlines()</B><P class="dense">- substitutes each pixel with maximum <A href="asimagexml.html#color">color</A>
                       <A href="blender.html#value_scanlines()">value</A> of top and bottom :
                       bottom = (bottom&gt;top)?bottom:top;
</P>
<A NAME="screen_scanlines()"></A><B>screen_scanlines()</B><P class="dense">- some weird merging algorithm taken from GIMP;
</P>
<A NAME="overlay_scanlines()"></A><B>overlay_scanlines()</B><P class="dense">- some weird merging algorithm taken from GIMP;
</P>
<A NAME="hue_scanlines()"></A><B>hue_scanlines()</B><P class="dense">- substitute <A href="blender.html#hue_scanlines()">hue</A> of bottom scanline with <A href="blender.html#hue_scanlines()">hue</A> of
                       top scanline;
</P>
<A NAME="saturate_scanlines()"></A><B>saturate_scanlines()</B><P class="dense">- substitute saturation of bottom scanline with
                       the saturation of top scanline;
</P>
<A NAME="value_scanlines()"></A><B>value_scanlines()</B><P class="dense">- substitute <A href="blender.html#value_scanlines()">value</A> of bottom scanline with
                       the <A href="blender.html#value_scanlines()">value</A> of top scanline;
</P>
<A NAME="colorize_scanlines()"></A><B>colorize_scanlines()</B><P class="dense">- combine luminance of bottom scanline with <A href="blender.html#hue_scanlines()">hue</A>
                       and saturation of top scanline;
</P>
<A NAME="dissipate_scanlines()-"></A><B>dissipate_scanlines()-</B><P class="dense">randomly alpha-<A href="blender.html#blend_scanlines_name2func()">blend</A> bottom and top scanlines,
                       using alpha <A href="blender.html#value_scanlines()">value</A> of top scanline as a
                       threshold for random values.
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE>void alphablend_scanlines( ASScanline *bottom, ASScanline *top, int );
void allanon_scanlines   ( ASScanline *bottom, ASScanline *top, int );
void tint_scanlines      ( ASScanline *bottom, ASScanline *top, int );
void add_scanlines       ( ASScanline *bottom, ASScanline *top, int );
void sub_scanlines       ( ASScanline *bottom, ASScanline *top, int );
void diff_scanlines      ( ASScanline *bottom, ASScanline *top, int );
void darken_scanlines    ( ASScanline *bottom, ASScanline *top, int );
void lighten_scanlines   ( ASScanline *bottom, ASScanline *top, int );
void screen_scanlines    ( ASScanline *bottom, ASScanline *top, int );
void overlay_scanlines   ( ASScanline *bottom, ASScanline *top, int );
void hue_scanlines       ( ASScanline *bottom, ASScanline *top, int );
void saturate_scanlines  ( ASScanline *bottom, ASScanline *top, int );
void value_scanlines     ( ASScanline *bottom, ASScanline *top, int );
void colorize_scanlines  ( ASScanline *bottom, ASScanline *top, int );
void dissipate_scanlines ( ASScanline *bottom, ASScanline *top, int );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>bottom</B></DT><DD class="dense">- pointer to the ASScanline that will be overalayed
</DD><DT class="dense"><B>top</B></DT><DD class="dense">- pointer to ASScanline that will <A href="blender.html#overlay_scanlines()">overlay</A> bottom.
</DD></DL></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>This functions accept 2 scanlines as an arguments stored in
ASScanline structures with data in 24.8 format. Merging operation is
performed on these scanlines and result is stored in bottom
ASScanline.
The following are merging methods used in each function :

</PRE></LI></UL>
<A NAME="libAfterImage/blend_scanlines_name2func()"><UL><p class="sect_header"><B>libAfterImage/blend_scanlines_name2func()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="blend_scanlines_name2func()"></A><B>blend_scanlines_name2func()</B><P class="dense"></P>
<A NAME="list_scanline_merging()"></A><B>list_scanline_merging()</B><P class="dense"></P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE>merge_scanlines_func blend_scanlines_name2func( const char *name );
void list_scanline_merging(FILE* stream, const char *format);
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>name</B></DT><DD class="dense">- string, identifying scanline merging function.
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns pointer to the scanline merging function on succes.
NULL on failure.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>blend_scanlines_name2func() will strip leading whitespaces off of
the supplied name, and then will attempt to match it against the <A href="blender.html#list_scanline_merging()">list</A>
of names of merging functions. It will then return pointer to the
function with matching name.
list_scanline_merging() simply prints out description of implemented
blending/merging methods onto the supplied stream, in supplied format.
Format must include 2 string specs, like so : &quot;%s - %s&quot; where first
one will be substituted to short method name, and second - description
</PRE></LI></UL>
<p><A href="preface.html">Preface</A>&nbsp;&nbsp;<A href="visualselect.html">Introduction</A>&nbsp;&nbsp;<A href="index.html">Topic index</A>&nbsp;&nbsp;<A href="Glossary.html">Glossary</A>&nbsp;&nbsp;<A href="#page_top">Back to Top</A>
<hr>
<p><FONT face="Verdana, Arial, Helvetica, sans-serif" size="-2">AfterStep version 2.2.12</a></FONT>
</body>
</html>