/usr/share/doc/libafterimage-dev/html/transform.html is in libafterimage-dev 2.2.12-6.
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 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | <!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 Transformations</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> <A href="../../afterstep/html/visualselect.html">Introduction</A> <A href="../../afterstep/html/index.html">Main index</A> <A href="index.html">API Topic index</A> <A href="Glossary.html">API Glossary</A><p>
<h1>ASImage Transformations</h1><font size=4>transformations available for ASImages</font><hr>
<A NAME="libAfterImage/transform.h"><UL><p class="sect_header"><B>libAfterImage/transform.h</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="transform"></A><B>transform</B><P class="dense"></P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE>Defines transformations that could be performed on <A href="asimage.html#ASImage">ASImage</A>.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>
Transformations can be performed with different degree of quality.
Internal engine uses 24.8 bits per channel per pixel. As the result
there are no precision loss, while performing complex calculations.
Error diffusion algorithms could be used to <A href="transform.html#transform">transform</A> it back into 8
bit without quality loss.
Any Transformation could be performed with the result written directly
into XImage, so that it could be displayed faster.
Complex interpolation algorithms are used to perform scaling
operations, thus yielding very good quality. All the transformations
are performed in integer math, with the result of greater speeds.
Optional MMX inline assembly has been incorporated into some
procedures, and allows one to achieve considerably better performance on
compatible CPUs.
</PRE></LI><LI><p class="refsect_header"><B>SEE ALSO</B></p><PRE> Transformations :
scale_asimage(), tile_asimage(), merge_layers(),
make_gradient(), flip_asimage(), mirror_asimage(),
pad_asimage(), blur_asimage_gauss(), fill_asimage(),
adjust_asimage_hsv()
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 <sasha at aftercode dot net>
</PRE></LI></UL>
<A NAME="libAfterImage/transform/scale_asimage()"><UL><p class="sect_header"><B>libAfterImage/transform/scale_asimage()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="scale_asimage()"></A><B>scale_asimage()</B><P class="dense">- scales source <A href="asimage.html#ASImage">ASImage</A> into new image of requested
dimensions.
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A> *scale_asimage( struct <A href="asvisual.html#ASVisual">ASVisual</A> *asv,
<A href="asimage.html#ASImage">ASImage</A> *src,
unsigned int to_width,
unsigned int to_height,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out, int quality );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>src</B></DT><DD class="dense">- source <A href="asimage.html#ASImage">ASImage</A>
</DD><DT class="dense"><B>to_width</B></DT><DD class="dense">- desired width of the resulting image
</DD><DT class="dense"><B>to_height</B></DT><DD class="dense">- desired height of the resulting image
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out-</B></DT><DD class="dense">compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns newly created and encoded <A href="asimage.html#ASImage">ASImage</A> on success, NULL of failure.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>If size has to be reduced - then several neighboring pixels will be
averaged into single pixel. If size has to be increased then new
pixels will be interpolated based on values of four neighboring pixels.
</PRE></LI><LI><p class="refsect_header"><B>EXAMPLE</B></p><PRE><A href="asscale.html#ASScale">ASScale</A>
</PRE></LI></UL>
<A NAME="libAfterImage/transform/tile_asimage()"><UL><p class="sect_header"><B>libAfterImage/transform/tile_asimage()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="tile_asimage()"></A><B>tile_asimage()</B><P class="dense">- tiles/crops <A href="asimage.html#ASImage">ASImage</A> to desired size, while optionaly
tinting it at the same time.
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A> *tile_asimage ( struct <A href="asvisual.html#ASVisual">ASVisual</A> *asv,
<A href="asimage.html#ASImage">ASImage</A> *src,
int offset_x,
int offset_y,
unsigned int to_width,
unsigned int to_height,
<A href="asvisual.html#ARGB32">ARGB32</A> <A href="blender.html#tint_scanlines()">tint</A>,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out, int quality );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>src</B></DT><DD class="dense">- source <A href="asimage.html#ASImage">ASImage</A>
</DD><DT class="dense"><B>offset_x</B></DT><DD class="dense">- left clip margin
</DD><DT class="dense"><B>offset_y</B></DT><DD class="dense">- right clip margin
</DD><DT class="dense"><B>to_width</B></DT><DD class="dense">- desired width of the resulting image
</DD><DT class="dense"><B>to_height</B></DT><DD class="dense">- desired height of the resulting image
</DD><DT class="dense"><B>tint</B></DT><DD class="dense">- <A href="asvisual.html#ARGB32">ARGB32</A> <A href="blender.html#value_scanlines()">value</A> describing tinting <A href="asimagexml.html#color">color</A>.
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out-</B></DT><DD class="dense">compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns newly created and encoded <A href="asimage.html#ASImage">ASImage</A> on success, NULL of failure.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>Offset_x and offset_y define origin on source image from which
tiling will <A href="imencdec.html#start_image_decoding()">start</A>. If offset_x or offset_y is outside of the image
boundaries, then it will be reduced by whole number of image sizes to
fit inside the image. At the time of tiling image will be tinted
unless <A href="blender.html#tint_scanlines()">tint</A> == 0.
</PRE></LI><LI><p class="refsect_header"><B>EXAMPLE</B></p><PRE><A href="astile.html#ASTile">ASTile</A>
</PRE></LI></UL>
<A NAME="libAfterImage/transform/merge_layers()"><UL><p class="sect_header"><B>libAfterImage/transform/merge_layers()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="merge_layers()"></A><B>merge_layers()</B><P class="dense"></P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A> *merge_layers ( struct <A href="asvisual.html#ASVisual">ASVisual</A> *asv,
<A href="asimage.html#ASImageLayer">ASImageLayer</A> *layers, int count,
unsigned int dst_width,
unsigned int dst_height,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out, int quality);
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>layers</B></DT><DD class="dense">- array of <A href="asimage.html#ASImageLayer">ASImageLayer</A> structures that will be rendered
one on top of another. First element corresponds to
the bottommost layer.
</DD><DT class="dense"><B>dst_width</B></DT><DD class="dense">- desired width of the resulting image
</DD><DT class="dense"><B>dst_height</B></DT><DD class="dense">- desired height of the resulting image
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out</B></DT><DD class="dense">- compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns newly created and encoded <A href="asimage.html#ASImage">ASImage</A> on success, NULL of failure.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>merge_layers() will <A href="asvisual.html#create_asvisual_for_id()">create</A> new <A href="asimage.html#ASImage">ASImage</A> of requested size. It will then
go through all the layers, and <A href="transform.html#fill_asimage()">fill</A> image with composition.
Bottommost layer will be used unchanged and above layers will be
superimposed on it, using algorithm specified in <A href="asimage.html#ASImageLayer">ASImageLayer</A>
structure of the overlaying layer. Layers may have smaller size
then destination image, and maybe placed in arbitrary locations. Each
layer will be padded to fit width of the destination image with all 0
effectively making it transparent.
</PRE></LI></UL>
<A NAME="libAfterImage/transform/make_gradient()"><UL><p class="sect_header"><B>libAfterImage/transform/make_gradient()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="make_gradient()"></A><B>make_gradient()</B><P class="dense">- renders linear <A href="asimagexml.html#gradient">gradient</A> into new <A href="asimage.html#ASImage">ASImage</A>
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A> *make_gradient ( struct <A href="asvisual.html#ASVisual">ASVisual</A> *asv,
struct <A href="asimage.html#ASGradient">ASGradient</A> *grad,
unsigned int width,
unsigned int height,
ASFlagType filter,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out, int quality);
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>grad</B></DT><DD class="dense">- <A href="asimage.html#ASGradient">ASGradient</A> structure defining how <A href="asimagexml.html#gradient">gradient</A> should be
drawn
</DD><DT class="dense"><B>width</B></DT><DD class="dense">- desired width of the resulting image
</DD><DT class="dense"><B>height</B></DT><DD class="dense">- desired height of the resulting image
</DD><DT class="dense"><B>filter</B></DT><DD class="dense">- only channels corresponding to <A href="asimagexml.html#set">set</A> bits will be
rendered.
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out-</B></DT><DD class="dense">compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns newly created and encoded <A href="asimage.html#ASImage">ASImage</A> on success, NULL of failure.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>make_gradient() will <A href="asvisual.html#create_asvisual_for_id()">create</A> new image of requested size and it will
<A href="transform.html#fill_asimage()">fill</A> it with <A href="asimagexml.html#gradient">gradient</A>, described in structure pointed to by grad.
Different dithering techniques will be applied to produce nicer
looking gradients.
</PRE></LI></UL>
<A NAME="libAfterImage/transform/flip_asimage()"><UL><p class="sect_header"><B>libAfterImage/transform/flip_asimage()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="flip_asimage()"></A><B>flip_asimage()</B><P class="dense">- rotates <A href="asimage.html#ASImage">ASImage</A> in 90 degree increments
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A> *flip_asimage ( struct <A href="asvisual.html#ASVisual">ASVisual</A> *asv,
<A href="asimage.html#ASImage">ASImage</A> *src,
int offset_x, int offset_y,
unsigned int to_width,
unsigned int to_height,
int <A href="asimage.html#flip_gradient()">flip</A>, <A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out, int quality );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>src</B></DT><DD class="dense">- source <A href="asimage.html#ASImage">ASImage</A>
</DD><DT class="dense"><B>offset_x</B></DT><DD class="dense">- left clip margin
</DD><DT class="dense"><B>offset_y</B></DT><DD class="dense">- right clip margin
</DD><DT class="dense"><B>to_width</B></DT><DD class="dense">- desired width of the resulting image
</DD><DT class="dense"><B>to_height</B></DT><DD class="dense">- desired height of the resulting image
</DD><DT class="dense"><B>flip</B></DT><DD class="dense">- <A href="asimage.html#flip_gradient()">flip</A> flags determining degree of rotation.
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out</B></DT><DD class="dense">- compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns newly created and encoded <A href="asimage.html#ASImage">ASImage</A> on success, NULL of failure.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>flip_asimage() will <A href="asvisual.html#create_asvisual_for_id()">create</A> new image of requested size, it will then
<A href="asimagexml.html#tile">tile</A> source image based on offset_x, offset_y, and destination size,
and it will <A href="asimagexml.html#rotate">rotate</A> it then based on <A href="asimage.html#flip_gradient()">flip</A> <A href="blender.html#value_scanlines()">value</A>. Three rotation angles
supported 90, 180 and 270 degrees.
</PRE></LI></UL>
<A NAME="libAfterImage/transform/mirror_asimage()"><UL><p class="sect_header"><B>libAfterImage/transform/mirror_asimage()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="mirror_asimage()"></A><B>mirror_asimage()</B><P class="dense"></P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A> *mirror_asimage ( struct <A href="asvisual.html#ASVisual">ASVisual</A> *asv,
<A href="asimage.html#ASImage">ASImage</A> *src,
int offset_x, int offset_y,
unsigned int to_width,
unsigned int to_height,
Bool vertical, <A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out, int quality );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>src</B></DT><DD class="dense">- source <A href="asimage.html#ASImage">ASImage</A>
</DD><DT class="dense"><B>offset_x</B></DT><DD class="dense">- left clip margin
</DD><DT class="dense"><B>offset_y</B></DT><DD class="dense">- right clip margin
</DD><DT class="dense"><B>to_width</B></DT><DD class="dense">- desired width of the resulting image
</DD><DT class="dense"><B>to_height</B></DT><DD class="dense">- desired height of the resulting image
</DD><DT class="dense"><B>vertical</B></DT><DD class="dense">- <A href="asimagexml.html#mirror">mirror</A> in vertical direction.
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out</B></DT><DD class="dense">- compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns newly created and encoded <A href="asimage.html#ASImage">ASImage</A> on success, NULL of failure.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>mirror_asimage() will <A href="asvisual.html#create_asvisual_for_id()">create</A> new image of requested size, it will then
<A href="asimagexml.html#tile">tile</A> source image based on offset_x, offset_y, and destination size,
and it will <A href="asimagexml.html#mirror">mirror</A> it in vertical or horizontal direction.
</PRE></LI></UL>
<A NAME="libAfterImage/transform/pad_asimage()"><UL><p class="sect_header"><B>libAfterImage/transform/pad_asimage()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="pad_asimage()"></A><B>pad_asimage()</B><P class="dense">enlarges <A href="asimage.html#ASImage">ASImage</A>, padding it with specified <A href="asimagexml.html#color">color</A> on
each side in accordance with requested geometry.
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A> *pad_asimage( <A href="asvisual.html#ASVisual">ASVisual</A> *asv, <A href="asimage.html#ASImage">ASImage</A> *src,
int dst_x, int dst_y,
unsigned int to_width,
unsigned int to_height,
<A href="asvisual.html#ARGB32">ARGB32</A> <A href="asimagexml.html#color">color</A>,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out, int quality );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>src</B></DT><DD class="dense">- source <A href="asimage.html#ASImage">ASImage</A>
</DD><DT class="dense"><B>dst_x,</B></DT><DD class="dense">dst_y - placement of the source image relative to the origin of
destination image
</DD><DT class="dense"><B>to_width</B></DT><DD class="dense">- width of the destination image
</DD><DT class="dense"><B>to_height</B></DT><DD class="dense">- height of the destination image
</DD><DT class="dense"><B>color</B></DT><DD class="dense">- <A href="asvisual.html#ARGB32">ARGB32</A> <A href="asimagexml.html#color">color</A> <A href="blender.html#value_scanlines()">value</A> to <A href="asimagexml.html#pad">pad</A> with.
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out</B></DT><DD class="dense">- compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns newly created and encoded <A href="asimage.html#ASImage">ASImage</A> on success, NULL of failure.
</PRE></LI></UL>
<A NAME="libAfterImage/transform/blur_asimage_gauss()"><UL><p class="sect_header"><B>libAfterImage/transform/blur_asimage_gauss()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="blur_asimage_gauss()"></A><B>blur_asimage_gauss()</B><P class="dense">Performs Gaussian blurr of the image
( useful for drop shadows and the likes ).
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A>* blur_asimage_gauss( <A href="asvisual.html#ASVisual">ASVisual</A>* asv, <A href="asimage.html#ASImage">ASImage</A>* src,
double horz, double vert,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out,
int quality );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>src</B></DT><DD class="dense">- source <A href="asimage.html#ASImage">ASImage</A>
</DD><DT class="dense"><B>horz</B></DT><DD class="dense">- horizontal radius of the blurr
</DD><DT class="dense"><B>vert</B></DT><DD class="dense">- vertical radius of the blurr
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out</B></DT><DD class="dense">- compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns newly created and encoded <A href="asimage.html#ASImage">ASImage</A> on success, NULL of failure.
</PRE></LI></UL>
<A NAME="libAfterImage/transform/fill_asimage()"><UL><p class="sect_header"><B>libAfterImage/transform/fill_asimage()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="fill_asimage()"></A><B>fill_asimage()</B><P class="dense">- Fills rectangle within the existing <A href="asimage.html#ASImage">ASImage</A> with
specified <A href="asimagexml.html#color">color</A>.
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE>Bool fill_asimage( <A href="asvisual.html#ASVisual">ASVisual</A> *asv, <A href="asimage.html#ASImage">ASImage</A> *im,
int x, int y, int width, int height,
<A href="asvisual.html#ARGB32">ARGB32</A> <A href="asimagexml.html#color">color</A> );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>im</B></DT><DD class="dense">- <A href="asimage.html#ASImage">ASImage</A> to <A href="transform.html#fill_asimage()">fill</A> with the <A href="asimagexml.html#color">color</A>
</DD><DT class="dense"><B>x,</B></DT><DD class="dense">y - left-top corner of the rectangle to <A href="transform.html#fill_asimage()">fill</A>.
</DD><DT class="dense"><B>width,</B></DT><DD class="dense">height - size of the rectangle to <A href="transform.html#fill_asimage()">fill</A>.
</DD><DT class="dense"><B>color</B></DT><DD class="dense">- <A href="asvisual.html#ARGB32">ARGB32</A> <A href="asimagexml.html#color">color</A> <A href="blender.html#value_scanlines()">value</A> to <A href="transform.html#fill_asimage()">fill</A> rectangle with.
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>True on success, False on failure.
</PRE></LI></UL>
<A NAME="libAfterImage/transform/adjust_asimage_hsv()"><UL><p class="sect_header"><B>libAfterImage/transform/adjust_asimage_hsv()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="adjust_asimage_hsv()"></A><B>adjust_asimage_hsv()</B><P class="dense">- adjusts image <A href="asimagexml.html#color">color</A> properties in HSV <A href="blender.html#colorspace">colorspace</A>
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A> *adjust_asimage_hsv( <A href="asvisual.html#ASVisual">ASVisual</A> *asv, <A href="asimage.html#ASImage">ASImage</A> *src,
int offset_x, int offset_y,
unsigned int to_width,
unsigned int to_height,
unsigned int affected_hue,
unsigned int affected_radius,
int hue_offset, int saturation_offset,
int value_offset,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out, int quality);
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>src</B></DT><DD class="dense">- <A href="asimage.html#ASImage">ASImage</A> to <A href="transform.html#adjust_asimage_hsv()">adjust</A> colors of.
</DD><DT class="dense"><B>offset_x,</B></DT><DD class="dense"></DD><DT class="dense"><B>offset_y</B></DT><DD class="dense">- position on infinite surface tiled with original image,
of the left-top corner of the area to be used for new
image.
</DD><DT class="dense"><B>to_width,</B></DT><DD class="dense"></DD><DT class="dense"><B>to_height</B></DT><DD class="dense">- size of the area of the original image to be used
for new image.
</DD><DT class="dense"><B>affected_hue</B></DT><DD class="dense">- <A href="blender.html#hue_scanlines()">hue</A> in degrees in range 0-360. This allows one to limit
impact of <A href="asimagexml.html#color">color</A> adjustment to affect only limited
range of hues.
</DD><DT class="dense"><B>affected_radius</B></DT><DD class="dense">Sets the diapason of the range of affected hues.
</DD><DT class="dense"><B>hue_offset</B></DT><DD class="dense">- <A href="blender.html#value_scanlines()">value</A> by which to change hues in affected range.
</DD><DT class="dense"><B>saturation_offset</B></DT><DD class="dense">-
<A href="blender.html#value_scanlines()">value</A> by which to change saturation of the pixels in
affected <A href="blender.html#hue_scanlines()">hue</A> range.
</DD><DT class="dense"><B>value_offset</B></DT><DD class="dense">- <A href="blender.html#value_scanlines()">value</A> by which to change Value(brightness) of pixels
in affected <A href="blender.html#hue_scanlines()">hue</A> range.
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out-</B></DT><DD class="dense">compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>returns newly created and encoded <A href="asimage.html#ASImage">ASImage</A> on success, NULL of failure.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>This function will <A href="asimagexml.html#tile">tile</A> original image to specified size with offsets
requested, and then it will go though it and <A href="transform.html#adjust_asimage_hsv()">adjust</A> <A href="blender.html#hue_scanlines()">hue</A>, saturation and
<A href="blender.html#value_scanlines()">value</A> of those pixels that have specific <A href="blender.html#hue_scanlines()">hue</A>, <A href="asimagexml.html#set">set</A> by affected_hue/
affected_radius parameters. When affected_radius is greater then 180
entire image will be adjusted. Note that since grayscale colors have
no <A href="blender.html#hue_scanlines()">hue</A> - the will not <A href="asimage.html#get_asimage_chanmask()">get</A> adjusted. Only saturation and <A href="blender.html#value_scanlines()">value</A> will be
adjusted in gray pixels.
Hue is measured as an angle on a 360 degree circle, The following is
relationship of <A href="blender.html#hue_scanlines()">hue</A> values to regular <A href="asimagexml.html#color">color</A> names :
red - 0
yellow - 60
green - 120
cyan - 180
blue - 240
magenta - 300
red - 360
All the <A href="blender.html#hue_scanlines()">hue</A> values in parameters will be adjusted to fall withing
0-360 range.
</PRE></LI></UL>
<A NAME="libAfterImage/transform/colorize_asimage_vector()"><UL><p class="sect_header"><B>libAfterImage/transform/colorize_asimage_vector()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="colorize_asimage_vector()"></A><B>colorize_asimage_vector()</B><P class="dense">creates <A href="asimage.html#ASImage">ASImage</A> from double precision indexed
image data - useful for scientific visualisation.
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE>Bool colorize_asimage_vector( <A href="asvisual.html#ASVisual">ASVisual</A> *asv, <A href="asimage.html#ASImage">ASImage</A> *im,
<A href="asimage.html#ASVectorPalette">ASVectorPalette</A> *palette,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
int quality );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>im</B></DT><DD class="dense">- <A href="asimage.html#ASImage">ASImage</A> to update.
</DD><DT class="dense"><B>palette</B></DT><DD class="dense">- palette to be used in conversion of double precision
values into colors.
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>True on success, False on failure.
</PRE></LI><LI><p class="refsect_header"><B>DESCRIPTION</B></p><PRE>This function will try to convert double precision indexed image data
into actuall <A href="asimagexml.html#color">color</A> image using palette. Original data should be
attached to <A href="asimage.html#ASImage">ASImage</A> using vector member. Operation is relatively fast
and allows representation of scientific data as <A href="asimagexml.html#color">color</A> image with
dynamically changing palette.
</PRE></LI></UL>
<A NAME="libAfterImage/transform/create_asimage_from_vector()"><UL><p class="sect_header"><B>libAfterImage/transform/create_asimage_from_vector()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="create_asimage_from_vector()"></A><B>create_asimage_from_vector()</B><P class="dense">- convinience function allowing to
<A href="asvisual.html#create_asvisual_for_id()">create</A> new <A href="asimage.html#ASImage">ASImage</A>, <A href="asimagexml.html#set">set</A> its vector data and <A href="blender.html#colorize_scanlines()">colorize</A> it using
palette - all in one step.
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A> *create_asimage_from_vector( <A href="asvisual.html#ASVisual">ASVisual</A> *asv, double *vector,
unsigned int width,
unsigned int height,
<A href="asimage.html#ASVectorPalette">ASVectorPalette</A> *palette,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression,
int quality );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>vector</B></DT><DD class="dense">- data to be attached to new <A href="asimage.html#ASImage">ASImage</A> and used to generate
RGB image
</DD><DT class="dense"><B>width,</B></DT><DD class="dense">height - size of the new image.
</DD><DT class="dense"><B>palette</B></DT><DD class="dense">- palette to be used in conversion of double precision
values into colors.
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.
</DD><DT class="dense"><B>compression_out-</B></DT><DD class="dense">compression level of resulting image in range 0-100.
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>New <A href="asimage.html#ASImage">ASImage</A> on success, NULL on failure.
</PRE></LI><LI><p class="refsect_header"><B>SEE ALSO</B></p><PRE>colorize_asimage_vector(), create_asimage(), set_asimage_vector()
</PRE></LI></UL>
<A NAME="libAfterImage/transform/slice_asimage2()"><UL><p class="sect_header"><B>libAfterImage/transform/slice_asimage2()</B></p></A><LI><p class="refsect_header"><B>NAME</B></p>
<A NAME="slice_asimage2()"></A><B>slice_asimage2()</B><P class="dense">- <A href="asimagexml.html#slice">slice</A> <A href="asimage.html#ASImage">ASImage</A> leaving its corners intact, and scaling
the middle part.
</P></LI><LI><p class="refsect_header"><B>SYNOPSIS</B></p><PRE><A href="asimage.html#ASImage">ASImage</A>*
slice_asimage2( <A href="asvisual.html#ASVisual">ASVisual</A> *asv, <A href="asimage.html#ASImage">ASImage</A> *src,
int slice_x_start, int slice_x_end,
int slice_y_start, int slice_y_end,
int to_width,
int to_height,
Bool scaled,
<A href="asimage.html#ASAltImFormats">ASAltImFormats</A> out_format,
unsigned int compression_out, int quality );
</PRE></LI><LI><p class="refsect_header"><B>INPUTS</B></p><DL class="dense"><DT class="dense"><B>asv</B></DT><DD class="dense">- pointer to valid <A href="asvisual.html#ASVisual">ASVisual</A> structure
</DD><DT class="dense"><B>src</B></DT><DD class="dense">- source <A href="asimage.html#ASImage">ASImage</A>.
</DD><DT class="dense"><B>slice_x_start</B></DT><DD class="dense">- ending of the left corners
</DD><DT class="dense"><B>slice_x_end</B></DT><DD class="dense">- beginning of the right corners
</DD><DT class="dense"><B>slice_y_start</B></DT><DD class="dense">- ending of the top corners
</DD><DT class="dense"><B>slice_y_end</B></DT><DD class="dense">- beginning of the bottom corners
</DD><DT class="dense"><B>to_width</B></DT><DD class="dense">- width of the generated image;
</DD><DT class="dense"><B>to_height</B></DT><DD class="dense">- height of the generated image;
</DD><DT class="dense"><B>scaled</B></DT><DD class="dense">- <A href="asimagexml.html#if">if</A> True - middle part of the image will be scaled,
otherwise - tiled;
</DD><DT class="dense"><B>out_format</B></DT><DD class="dense">- optionally describes alternative <A href="asimage.html#ASImage">ASImage</A> format that
should be produced as the result - XImage, <A href="asvisual.html#ARGB32">ARGB32</A>, etc.;
</DD><DT class="dense"><B>compression_out-</B></DT><DD class="dense">compression level of resulting image in range 0-100;
</DD><DT class="dense"><B>quality</B></DT><DD class="dense">- output quality.
</DD></DL></LI><LI><p class="refsect_header"><B>RETURN VALUE</B></p><PRE>New <A href="asimage.html#ASImage">ASImage</A> on success, NULL on failure.
</PRE></LI><LI><p class="refsect_header"><B>SEE ALSO</B></p><PRE>scale_asimage(), tile_asimage()
</PRE></LI></UL>
<p><A href="preface.html">Preface</A> <A href="visualselect.html">Introduction</A> <A href="index.html">Topic index</A> <A href="Glossary.html">Glossary</A> <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>
|