• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3
4
5<!doctype html>
6<html lang="en">
7<head>
8  <meta charset="utf-8"  />
9  <meta name="viewport" content="width=device-width, initial-scale=1"  />
10  <title>ImageMagick - MagickCore, C API: Add an Effect</title>
11  <meta name="application-name" content="ImageMagick" />
12  <meta name="description" content="Use ImageMagick® to create, edit, compose, and convert digital images. Resize an image, crop it, change its shades and colors, add captions, and more." />
13  <meta name="application-url" content="https://imagemagick.org" />
14  <meta name="generator" content="PHP" />
15  <meta name="keywords" content="magickcore, c, api:, add, an, effect, image processing software" />
16  <meta name="rating" content="GENERAL" />
17  <meta name="robots" content="INDEX, FOLLOW" />
18  <meta name="generator" content="ImageMagick Studio LLC" />
19  <meta name="author" content="ImageMagick Studio LLC" />
20  <meta name="revisit-after" content="2 DAYS" />
21  <meta name="resource-type" content="document" />
22  <meta name="copyright" content="Copyright (c) 1999-2020 ImageMagick Studio LLC" />
23  <meta name="distribution" content="Global" />
24  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25  <meta property='og:url' content='../../' />
26  <meta property='og:title' content='ImageMagick' />
27  <meta property='og:image' content='../../../images/logo.png' />
28  <meta property='og:type' content='website' />
29  <meta property='og:site_name' content='ImageMagick' />
30  <meta property='og:description' content="Create, Edit, Compose, or Convert Digital Images" />
31  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
32  <link href="effect.html" rel="canonical" />
33  <link href="../../../images/wand.png" rel="icon" />
34  <link href="../../../images/wand.ico" rel="shortcut icon" />
35  <link href="../../assets/magick.css" rel="stylesheet" />
36</head>
37<body>
38  <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
39  <div class="container-fluid">
40    <a class="navbar-brand" href="../../"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../../../images/wand.ico"/></a>
41    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#magick-navbars" aria-controls="magick-navbars" aria-expanded="false" aria-label="Toggle navigation">
42      <span class="navbar-toggler-icon"></span>
43    </button>
44
45    <div class="collapse navbar-collapse" id="magick-navbars">
46      <ul class="navbar-nav me-auto mb-2 mb-md-0">
47        <li class="nav-item">
48          <a class="nav-link " href="../../www/index.html">Home</a>
49        </li>
50        <li class="nav-item">
51          <a class="nav-link " href="../../www/download.html">Download</a>
52        </li>
53        <li class="nav-item">
54          <a class="nav-link " href="../../www/command-line-tools.html">Tools</a>
55        </li>
56        <li class="nav-item">
57          <a class="nav-link " href="../../www/command-line-processing.html">CLI</a>
58        </li>
59        <li class="nav-item">
60          <a class="nav-link " href="../../www/develop.html">Develop</a>
61        </li>
62        <li class="nav-item">
63          <a class="nav-link" target="_blank" href="https://github.com/ImageMagick/ImageMagick/discussions">Community</a>
64        </li>
65        <li class="nav-item">
66          <iframe src="https://github.com/sponsors/ImageMagick/button" title="Sponsor ImageMagick" height="35" width="107" style="border: 0;"></iframe>
67        </li>
68      </ul>
69      <form class="d-flex form-inline" action="https://imagemagick.org/script/search.php">
70        <input class="form-control me-2" type="text" name="q" placeholder="Search" aria-label="Search">
71        <button class="btn btn-outline-success" type="submit" name="sa">Search</button>
72      </form>
73    </div>
74  </div>
75  </nav>
76
77  <div class="container">
78    <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script>
79    <ins class="adsbygoogle"
80      style="display:block"
81      data-ad-client="ca-pub-3129977114552745"
82      data-ad-slot="6345125851"
83      data-full-width-responsive="true"
84      data-ad-format="horizontal"></ins>
85    <script>
86      (adsbygoogle = window.adsbygoogle || []).push({});
87    </script>
88
89  </div>
90
91  <main class="container">
92  <div class="magick-template">
93<div class="magick-header">
94<p class="text-center"><a href="effect.html#AdaptiveBlurImage">AdaptiveBlurImage</a> &#8226; <a href="effect.html#AdaptiveSharpenImage">AdaptiveSharpenImage</a> &#8226; <a href="effect.html#BlurImage">BlurImage</a> &#8226; <a href="effect.html#BilateralBlurImage">BilateralBlurImage</a> &#8226; <a href="effect.html#ConvolveImage">ConvolveImage</a> &#8226; <a href="effect.html#DespeckleImage">DespeckleImage</a> &#8226; <a href="effect.html#EdgeImage">EdgeImage</a> &#8226; <a href="effect.html#EmbossImage">EmbossImage</a> &#8226; <a href="effect.html#GaussianBlurImage">GaussianBlurImage</a> &#8226; <a href="effect.html#KuwaharaImage">KuwaharaImage</a> &#8226; <a href="effect.html#LocalContrastImage">LocalContrastImage</a> &#8226; <a href="effect.html#MotionBlurImage">MotionBlurImage</a> &#8226; <a href="effect.html#PreviewImage">PreviewImage</a> &#8226; <a href="effect.html#RotationalBlurImage">RotationalBlurImage</a> &#8226; <a href="effect.html#SelectiveBlurImage">SelectiveBlurImage</a> &#8226; <a href="effect.html#ShadeImage">ShadeImage</a> &#8226; <a href="effect.html#SharpenImage">SharpenImage</a> &#8226; <a href="effect.html#SpreadImage">SpreadImage</a> &#8226; <a href="effect.html#UnsharpMaskImage">UnsharpMaskImage</a></p>
95
96<h2><a href="../../api/MagickCore/effect_8c.html" id="AdaptiveBlurImage">AdaptiveBlurImage</a></h2>
97
98<p>AdaptiveBlurImage() adaptively blurs the image by blurring less intensely near image edges and more intensely far from edges.  We blur the image with a Gaussian operator of the given radius and standard deviation (sigma).  For reasonable results, radius should be larger than sigma.  Use a radius of 0 and AdaptiveBlurImage() selects a suitable radius for you.</p>
99
100<p>The format of the AdaptiveBlurImage method is:</p>
101
102<pre class="text">
103Image *AdaptiveBlurImage(const Image *image,const double radius,
104  const double sigma,ExceptionInfo *exception)
105</pre>
106
107<p>A description of each parameter follows:</p>
108
109<dd>
110</dd>
111
112<dd> </dd>
113<dl class="dl-horizontal">
114<dt>image</dt>
115<dd>the image. </dd>
116
117<dd> </dd>
118<dt>radius</dt>
119<dd>the radius of the Gaussian, in pixels, not counting the center pixel. </dd>
120
121<dd> </dd>
122<dt>sigma</dt>
123<dd>the standard deviation of the Laplacian, in pixels. </dd>
124
125<dd> </dd>
126<dt>exception</dt>
127<dd>return any errors or warnings in this structure. </dd>
128
129<dd>  </dd>
130</dl>
131<h2><a href="../../api/MagickCore/effect_8c.html" id="AdaptiveSharpenImage">AdaptiveSharpenImage</a></h2>
132
133<p>AdaptiveSharpenImage() adaptively sharpens the image by sharpening more intensely near image edges and less intensely far from edges. We sharpen the image with a Gaussian operator of the given radius and standard deviation (sigma).  For reasonable results, radius should be larger than sigma.  Use a radius of 0 and AdaptiveSharpenImage() selects a suitable radius for you.</p>
134
135<p>The format of the AdaptiveSharpenImage method is:</p>
136
137<pre class="text">
138Image *AdaptiveSharpenImage(const Image *image,const double radius,
139  const double sigma,ExceptionInfo *exception)
140</pre>
141
142<p>A description of each parameter follows:</p>
143
144<dd>
145</dd>
146
147<dd> </dd>
148<dl class="dl-horizontal">
149<dt>image</dt>
150<dd>the image. </dd>
151
152<dd> </dd>
153<dt>radius</dt>
154<dd>the radius of the Gaussian, in pixels, not counting the center pixel. </dd>
155
156<dd> </dd>
157<dt>sigma</dt>
158<dd>the standard deviation of the Laplacian, in pixels. </dd>
159
160<dd> </dd>
161<dt>exception</dt>
162<dd>return any errors or warnings in this structure. </dd>
163
164<dd>  </dd>
165</dl>
166<h2><a href="../../api/MagickCore/effect_8c.html" id="BlurImage">BlurImage</a></h2>
167
168<p>BlurImage() blurs an image.  We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma).  For reasonable results, the radius should be larger than sigma.  Use a radius of 0 and BlurImage() selects a suitable radius for you.</p>
169
170<p>The format of the BlurImage method is:</p>
171
172<pre class="text">
173Image *BlurImage(const Image *image,const double radius,
174  const double sigma,ExceptionInfo *exception)
175</pre>
176
177<p>A description of each parameter follows:</p>
178
179<dd>
180</dd>
181
182<dd> </dd>
183<dl class="dl-horizontal">
184<dt>image</dt>
185<dd>the image. </dd>
186
187<dd> </dd>
188<dt>radius</dt>
189<dd>the radius of the Gaussian, in pixels, not counting the center pixel. </dd>
190
191<dd> </dd>
192<dt>sigma</dt>
193<dd>the standard deviation of the Gaussian, in pixels. </dd>
194
195<dd> </dd>
196<dt>exception</dt>
197<dd>return any errors or warnings in this structure. </dd>
198
199<dd>  </dd>
200</dl>
201<h2><a href="../../api/MagickCore/effect_8c.html" id="BilateralBlurImage">BilateralBlurImage</a></h2>
202
203<p>BilateralBlurImage() is a non-linear, edge-preserving, and noise-reducing smoothing filter for images.  It replaces the intensity of each pixel with a weighted average of intensity values from nearby pixels.  This weight is based on a Gaussian distribution.  The weights depend not only on Euclidean distance of pixels, but also on the radiometric differences (e.g., range differences, such as color intensity, depth distance, etc.). This preserves sharp edges.</p>
204
205<p>The format of the BilateralBlurImage method is:</p>
206
207<pre class="text">
208Image *BilateralBlurImage(const Image *image,const size_t width,
209  const size_t height,const double intensity_sigma,
210  const double spatial_sigma,ExceptionInfo *exception)
211</pre>
212
213<p>A description of each parameter follows:</p>
214
215<dd>
216</dd>
217
218<dd> </dd>
219<dl class="dl-horizontal">
220<dt>image</dt>
221<dd>the image. </dd>
222
223<dd> </dd>
224<dt>width</dt>
225<dd>the width of the neighborhood in pixels. </dd>
226
227<dd> </dd>
228<dt>height</dt>
229<dd>the height of the neighborhood in pixels. </dd>
230
231<dd> </dd>
232<dt>intensity_sigma</dt>
233<dd>sigma in the intensity space. A larger value means that farther colors within the pixel neighborhood (see spatial_sigma) will be mixed together, resulting in larger areas of semi-equal color. </dd>
234
235<dd> </dd>
236<dt>spatial_sigma</dt>
237<dd>sigma in the coordinate space. A larger value means that farther pixels influence each other as long as their colors are close enough (see intensity_sigma ). When the neigborhood diameter is greater than zero, it specifies the neighborhood size regardless of spatial_sigma. Otherwise, the neigborhood diameter is proportional to spatial_sigma. </dd>
238
239<dd> </dd>
240<dt>exception</dt>
241<dd>return any errors or warnings in this structure. </dd>
242
243<dd>  </dd>
244</dl>
245<h2><a href="../../api/MagickCore/effect_8c.html" id="ConvolveImage">ConvolveImage</a></h2>
246
247<p>ConvolveImage() applies a custom convolution kernel to the image.</p>
248
249<p>The format of the ConvolveImage method is:</p>
250
251<pre class="text">
252Image *ConvolveImage(const Image *image,const KernelInfo *kernel,
253  ExceptionInfo *exception)
254</pre>
255
256<p>A description of each parameter follows:</p>
257
258<dd>
259</dd>
260
261<dd> </dd>
262<dl class="dl-horizontal">
263<dt>image</dt>
264<dd>the image. </dd>
265
266<dd> </dd>
267<dt>kernel</dt>
268<dd>the filtering kernel. </dd>
269
270<dd> </dd>
271<dt>exception</dt>
272<dd>return any errors or warnings in this structure. </dd>
273
274<dd>  </dd>
275</dl>
276<h2><a href="../../api/MagickCore/effect_8c.html" id="DespeckleImage">DespeckleImage</a></h2>
277
278<p>DespeckleImage() reduces the speckle noise in an image while perserving the edges of the original image.  A speckle removing filter uses a complementary hulling technique (raising pixels that are darker than their surrounding neighbors, then complementarily lowering pixels that are brighter than their surrounding neighbors) to reduce the speckle index of that image (reference Crimmins speckle removal).</p>
279
280<p>The format of the DespeckleImage method is:</p>
281
282<pre class="text">
283Image *DespeckleImage(const Image *image,ExceptionInfo *exception)
284</pre>
285
286<p>A description of each parameter follows:</p>
287
288<dd>
289</dd>
290
291<dd> </dd>
292<dl class="dl-horizontal">
293<dt>image</dt>
294<dd>the image. </dd>
295
296<dd> </dd>
297<dt>exception</dt>
298<dd>return any errors or warnings in this structure. </dd>
299
300<dd>  </dd>
301</dl>
302<h2><a href="../../api/MagickCore/effect_8c.html" id="EdgeImage">EdgeImage</a></h2>
303
304<p>EdgeImage() finds edges in an image.  Radius defines the radius of the convolution filter.  Use a radius of 0 and EdgeImage() selects a suitable radius for you.</p>
305
306<p>The format of the EdgeImage method is:</p>
307
308<pre class="text">
309Image *EdgeImage(const Image *image,const double radius,
310  ExceptionInfo *exception)
311</pre>
312
313<p>A description of each parameter follows:</p>
314
315<dd>
316</dd>
317
318<dd> </dd>
319<dl class="dl-horizontal">
320<dt>image</dt>
321<dd>the image. </dd>
322
323<dd> </dd>
324<dt>radius</dt>
325<dd>the radius of the pixel neighborhood. </dd>
326
327<dd> </dd>
328<dt>exception</dt>
329<dd>return any errors or warnings in this structure. </dd>
330
331<dd>  </dd>
332</dl>
333<h2><a href="../../api/MagickCore/effect_8c.html" id="EmbossImage">EmbossImage</a></h2>
334
335<p>EmbossImage() returns a grayscale image with a three-dimensional effect. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma).  For reasonable results, radius should be larger than sigma.  Use a radius of 0 and Emboss() selects a suitable radius for you.</p>
336
337<p>The format of the EmbossImage method is:</p>
338
339<pre class="text">
340Image *EmbossImage(const Image *image,const double radius,
341  const double sigma,ExceptionInfo *exception)
342</pre>
343
344<p>A description of each parameter follows:</p>
345
346<dd>
347</dd>
348
349<dd> </dd>
350<dl class="dl-horizontal">
351<dt>image</dt>
352<dd>the image. </dd>
353
354<dd> </dd>
355<dt>radius</dt>
356<dd>the radius of the pixel neighborhood. </dd>
357
358<dd> </dd>
359<dt>sigma</dt>
360<dd>the standard deviation of the Gaussian, in pixels. </dd>
361
362<dd> </dd>
363<dt>exception</dt>
364<dd>return any errors or warnings in this structure. </dd>
365
366<dd>  </dd>
367</dl>
368<h2><a href="../../api/MagickCore/effect_8c.html" id="GaussianBlurImage">GaussianBlurImage</a></h2>
369
370<p>GaussianBlurImage() blurs an image.  We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma.  Use a radius of 0 and GaussianBlurImage() selects a suitable radius for you.</p>
371
372<p>The format of the GaussianBlurImage method is:</p>
373
374<pre class="text">
375Image *GaussianBlurImage(const Image *image,onst double radius,
376  const double sigma,ExceptionInfo *exception)
377</pre>
378
379<p>A description of each parameter follows:</p>
380
381<dd>
382</dd>
383
384<dd> </dd>
385<dl class="dl-horizontal">
386<dt>image</dt>
387<dd>the image. </dd>
388
389<dd> </dd>
390<dt>radius</dt>
391<dd>the radius of the Gaussian, in pixels, not counting the center pixel. </dd>
392
393<dd> </dd>
394<dt>sigma</dt>
395<dd>the standard deviation of the Gaussian, in pixels. </dd>
396
397<dd> </dd>
398<dt>exception</dt>
399<dd>return any errors or warnings in this structure. </dd>
400
401<dd>  </dd>
402</dl>
403<h2><a href="../../api/MagickCore/effect_8c.html" id="KuwaharaImage">KuwaharaImage</a></h2>
404
405<p>KuwaharaImage() is an edge preserving noise reduction filter.</p>
406
407<p>The format of the KuwaharaImage method is:</p>
408
409<pre class="text">
410Image *KuwaharaImage(const Image *image,const double radius,
411  const double sigma,ExceptionInfo *exception)
412</pre>
413
414<p>A description of each parameter follows:</p>
415
416<dd>
417</dd>
418
419<dd> </dd>
420<dl class="dl-horizontal">
421<dt>image</dt>
422<dd>the image. </dd>
423
424<dd> </dd>
425<dt>radius</dt>
426<dd>the square window radius. </dd>
427
428<dd> </dd>
429<dt>sigma</dt>
430<dd>the standard deviation of the Gaussian, in pixels. </dd>
431
432<dd> </dd>
433<dt>exception</dt>
434<dd>return any errors or warnings in this structure. </dd>
435
436<dd>  </dd>
437</dl>
438<h2><a href="../../api/MagickCore/effect_8c.html" id="LocalContrastImage">LocalContrastImage</a></h2>
439
440<p>LocalContrastImage() attempts to increase the appearance of large-scale light-dark transitions. Local contrast enhancement works similarly to sharpening with an unsharp mask, however the mask is instead created using an image with a greater blur distance.</p>
441
442<p>The format of the LocalContrastImage method is:</p>
443
444<pre class="text">
445Image *LocalContrastImage(const Image *image, const double radius,
446  const double strength,ExceptionInfo *exception)
447</pre>
448
449<p>A description of each parameter follows:</p>
450
451<dd>
452</dd>
453
454<dd> </dd>
455<dl class="dl-horizontal">
456<dt>image</dt>
457<dd>the image. </dd>
458
459<dd> </dd>
460<dt>radius</dt>
461<dd>the radius of the Gaussian blur, in percentage with 100 resulting in a blur radius of 20 of largest dimension. </dd>
462
463<dd> </dd>
464<dt>strength</dt>
465<dd>the strength of the blur mask in percentage. </dd>
466
467<dd> </dd>
468<dt>exception</dt>
469<dd>return any errors or warnings in this structure. </dd>
470
471<dd>  </dd>
472</dl>
473<h2><a href="../../api/MagickCore/effect_8c.html" id="MotionBlurImage">MotionBlurImage</a></h2>
474
475<p>MotionBlurImage() simulates motion blur.  We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma.  Use a radius of 0 and MotionBlurImage() selects a suitable radius for you. Angle gives the angle of the blurring motion.</p>
476
477<p>Andrew Protano contributed this effect.</p>
478
479<p>The format of the MotionBlurImage method is:</p>
480
481<pre class="text">
482    Image *MotionBlurImage(const Image *image,const double radius,
483const double sigma,const double angle,ExceptionInfo *exception)
484</pre>
485
486<p>A description of each parameter follows:</p>
487
488<dd>
489</dd>
490
491<dd> </dd>
492<dl class="dl-horizontal">
493<dt>image</dt>
494<dd>the image. </dd>
495
496<dd> </dd>
497<dt>radius</dt>
498<dd>the radius of the Gaussian, in pixels, not counting the center pixel. </dd>
499
500<dd> </dd>
501<dt>sigma</dt>
502<dd>the standard deviation of the Gaussian, in pixels. </dd>
503
504<dd> </dd>
505<dt>angle</dt>
506<dd>Apply the effect along this angle. </dd>
507
508<dd> </dd>
509<dt>exception</dt>
510<dd>return any errors or warnings in this structure. </dd>
511
512<dd>  </dd>
513</dl>
514<h2><a href="../../api/MagickCore/effect_8c.html" id="PreviewImage">PreviewImage</a></h2>
515
516<p>PreviewImage() tiles 9 thumbnails of the specified image with an image processing operation applied with varying parameters.  This may be helpful pin-pointing an appropriate parameter for a particular image processing operation.</p>
517
518<p>The format of the PreviewImages method is:</p>
519
520<pre class="text">
521Image *PreviewImages(const Image *image,const PreviewType preview,
522  ExceptionInfo *exception)
523</pre>
524
525<p>A description of each parameter follows:</p>
526
527<dd>
528</dd>
529
530<dd> </dd>
531<dl class="dl-horizontal">
532<dt>image</dt>
533<dd>the image. </dd>
534
535<dd> </dd>
536<dt>preview</dt>
537<dd>the image processing operation. </dd>
538
539<dd> </dd>
540<dt>exception</dt>
541<dd>return any errors or warnings in this structure. </dd>
542
543<dd>  </dd>
544</dl>
545<h2><a href="../../api/MagickCore/effect_8c.html" id="RotationalBlurImage">RotationalBlurImage</a></h2>
546
547<p>RotationalBlurImage() applies a radial blur to the image.</p>
548
549<p>Andrew Protano contributed this effect.</p>
550
551<p>The format of the RotationalBlurImage method is:</p>
552
553<pre class="text">
554    Image *RotationalBlurImage(const Image *image,const double angle,
555ExceptionInfo *exception)
556</pre>
557
558<p>A description of each parameter follows:</p>
559
560<dd>
561</dd>
562
563<dd> </dd>
564<dl class="dl-horizontal">
565<dt>image</dt>
566<dd>the image. </dd>
567
568<dd> </dd>
569<dt>angle</dt>
570<dd>the angle of the radial blur. </dd>
571
572<dd> </dd>
573<dt>blur</dt>
574<dd>the blur. </dd>
575
576<dd> </dd>
577<dt>exception</dt>
578<dd>return any errors or warnings in this structure. </dd>
579
580<dd>  </dd>
581</dl>
582<h2><a href="../../api/MagickCore/effect_8c.html" id="SelectiveBlurImage">SelectiveBlurImage</a></h2>
583
584<p>SelectiveBlurImage() selectively blur pixels within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.</p>
585
586<p>The format of the SelectiveBlurImage method is:</p>
587
588<pre class="text">
589Image *SelectiveBlurImage(const Image *image,const double radius,
590  const double sigma,const double threshold,ExceptionInfo *exception)
591</pre>
592
593<p>A description of each parameter follows:</p>
594
595<dd>
596</dd>
597
598<dd> </dd>
599<dl class="dl-horizontal">
600<dt>image</dt>
601<dd>the image. </dd>
602
603<dd> </dd>
604<dt>radius</dt>
605<dd>the radius of the Gaussian, in pixels, not counting the center pixel. </dd>
606
607<dd> </dd>
608<dt>sigma</dt>
609<dd>the standard deviation of the Gaussian, in pixels. </dd>
610
611<dd> </dd>
612<dt>threshold</dt>
613<dd>only pixels within this contrast threshold are included in the blur operation. </dd>
614
615<dd> </dd>
616<dt>exception</dt>
617<dd>return any errors or warnings in this structure. </dd>
618
619<dd>  </dd>
620</dl>
621<h2><a href="../../api/MagickCore/effect_8c.html" id="ShadeImage">ShadeImage</a></h2>
622
623<p>ShadeImage() shines a distant light on an image to create a three-dimensional effect. You control the positioning of the light with azimuth and elevation; azimuth is measured in degrees off the x axis and elevation is measured in pixels above the Z axis.</p>
624
625<p>The format of the ShadeImage method is:</p>
626
627<pre class="text">
628Image *ShadeImage(const Image *image,const MagickBooleanType gray,
629  const double azimuth,const double elevation,ExceptionInfo *exception)
630</pre>
631
632<p>A description of each parameter follows:</p>
633
634<dd>
635</dd>
636
637<dd> </dd>
638<dl class="dl-horizontal">
639<dt>image</dt>
640<dd>the image. </dd>
641
642<dd> </dd>
643<dt>gray</dt>
644<dd>A value other than zero shades the intensity of each pixel. </dd>
645
646<dd> </dd>
647<dt>azimuth, elevation</dt>
648<dd> Define the light source direction. </dd>
649
650<dd> </dd>
651<dt>exception</dt>
652<dd>return any errors or warnings in this structure. </dd>
653
654<dd>  </dd>
655</dl>
656<h2><a href="../../api/MagickCore/effect_8c.html" id="SharpenImage">SharpenImage</a></h2>
657
658<p>SharpenImage() sharpens the image.  We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma).  For reasonable results, radius should be larger than sigma.  Use a radius of 0 and SharpenImage() selects a suitable radius for you.</p>
659
660<p>Using a separable kernel would be faster, but the negative weights cancel out on the corners of the kernel producing often undesirable ringing in the filtered result; this can be avoided by using a 2D gaussian shaped image sharpening kernel instead.</p>
661
662<p>The format of the SharpenImage method is:</p>
663
664<pre class="text">
665    Image *SharpenImage(const Image *image,const double radius,
666const double sigma,ExceptionInfo *exception)
667</pre>
668
669<p>A description of each parameter follows:</p>
670
671<dd>
672</dd>
673
674<dd> </dd>
675<dl class="dl-horizontal">
676<dt>image</dt>
677<dd>the image. </dd>
678
679<dd> </dd>
680<dt>radius</dt>
681<dd>the radius of the Gaussian, in pixels, not counting the center pixel. </dd>
682
683<dd> </dd>
684<dt>sigma</dt>
685<dd>the standard deviation of the Laplacian, in pixels. </dd>
686
687<dd> </dd>
688<dt>exception</dt>
689<dd>return any errors or warnings in this structure. </dd>
690
691<dd>  </dd>
692</dl>
693<h2><a href="../../api/MagickCore/effect_8c.html" id="SpreadImage">SpreadImage</a></h2>
694
695<p>SpreadImage() is a special effects method that randomly displaces each pixel in a square area defined by the radius parameter.</p>
696
697<p>The format of the SpreadImage method is:</p>
698
699<pre class="text">
700Image *SpreadImage(const Image *image,
701  const PixelInterpolateMethod method,const double radius,
702  ExceptionInfo *exception)
703</pre>
704
705<p>A description of each parameter follows:</p>
706
707<dd>
708</dd>
709
710<dd> </dd>
711<dl class="dl-horizontal">
712<dt>image</dt>
713<dd>the image. </dd>
714
715<dd> </dd>
716<dt>method</dt>
717<dd> intepolation method. </dd>
718
719<dd> </dd>
720<dt>radius</dt>
721<dd> choose a random pixel in a neighborhood of this extent. </dd>
722
723<dd> </dd>
724<dt>exception</dt>
725<dd>return any errors or warnings in this structure. </dd>
726
727<dd>  </dd>
728</dl>
729<h2><a href="../../api/MagickCore/effect_8c.html" id="UnsharpMaskImage">UnsharpMaskImage</a></h2>
730
731<p>UnsharpMaskImage() sharpens one or more image channels.  We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma).  For reasonable results, radius should be larger than sigma.  Use a radius of 0 and UnsharpMaskImage() selects a suitable radius for you.</p>
732
733<p>The format of the UnsharpMaskImage method is:</p>
734
735<pre class="text">
736    Image *UnsharpMaskImage(const Image *image,const double radius,
737const double sigma,const double amount,const double threshold,
738ExceptionInfo *exception)
739</pre>
740
741<p>A description of each parameter follows:</p>
742
743<dd>
744</dd>
745
746<dd> </dd>
747<dl class="dl-horizontal">
748<dt>image</dt>
749<dd>the image. </dd>
750
751<dd> </dd>
752<dt>radius</dt>
753<dd>the radius of the Gaussian, in pixels, not counting the center pixel. </dd>
754
755<dd> </dd>
756<dt>sigma</dt>
757<dd>the standard deviation of the Gaussian, in pixels. </dd>
758
759<dd> </dd>
760<dt>gain</dt>
761<dd>the percentage of the difference between the original and the blur image that is added back into the original. </dd>
762
763<dd> </dd>
764<dt>threshold</dt>
765<dd>the threshold in pixels needed to apply the diffence gain. </dd>
766
767<dd> </dd>
768<dt>exception</dt>
769<dd>return any errors or warnings in this structure. </dd>
770
771<dd>  </dd>
772</dl>
773</div>
774  </div>
775  </main><!-- /.container -->
776  <footer class="magick-footer">
777    <div class="container-fluid">
778      <a href="../../www/security-policy.html">Security</a> •
779      <a href="../../www/news.html">News</a>
780
781      <a href="effect.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../../images/wand.ico"/></a>
782
783      <a href="../../www/links.html">Related</a> •
784      <a href="../../www/sitemap.html">Sitemap</a>
785   <br/>
786     <a href="../../www/support.html">Sponsor</a> •
787     <a href="../../www/cite.html">Cite</a> •
788     <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
789     <a href="../../www/contact.html">Contact Us</a>
790   <br/>
791     <a href="https://github.com/imagemagick/imagemagick" target="_blank" rel="noopener" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 499.36" width="2%" height="2%" role="img" focusable="false"><title>GitHub</title><path fill="currentColor" fill-rule="evenodd" d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z"/></svg></a> •
792     <a href="https://twitter.com/imagemagick" target="_blank" rel="noopener" aria-label="Twitter"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 416.32" width="2%" height="2%" role="img" focusable="false"><title>Twitter</title><path fill="currentColor" d="M160.83 416.32c193.2 0 298.92-160.22 298.92-298.92 0-4.51 0-9-.2-13.52A214 214 0 0 0 512 49.38a212.93 212.93 0 0 1-60.44 16.6 105.7 105.7 0 0 0 46.3-58.19 209 209 0 0 1-66.79 25.37 105.09 105.09 0 0 0-181.73 71.91 116.12 116.12 0 0 0 2.66 24c-87.28-4.3-164.73-46.3-216.56-109.82A105.48 105.48 0 0 0 68 159.6a106.27 106.27 0 0 1-47.53-13.11v1.43a105.28 105.28 0 0 0 84.21 103.06 105.67 105.67 0 0 1-47.33 1.84 105.06 105.06 0 0 0 98.14 72.94A210.72 210.72 0 0 1 25 370.84a202.17 202.17 0 0 1-25-1.43 298.85 298.85 0 0 0 160.83 46.92"/></svg></a>
793    <br/>
794    <small>© 1999-2021 ImageMagick Studio LLC</small>
795    </div>
796  </footer>
797
798  <!-- Javascript assets -->
799  <script src="../../assets/magick.js" ></script>
800  </body>
801</html>
802