Blur and sharpen
On this page
Blur and sharpen operations can be of great value for both aesthetic and practical reasons.
For example, they can be used to blur out people's faces or (combined with overlay operations) to draw attention to certain elements in a design while providing a more pleasing overall look.
Furthermore, you can "bake in" the applied changes and create a new file that can no longer be reverted to its original state.
Blur
-/blur/
-/blur/:strength/
Blurs images by the :strength
factor. The filtering mode is Gaussian Blur,
where :strength
parameter sets the blur radius — effect intensity. Technically,
:strength
controls the Gaussian Blur standard deviation multiplied by ten.
The value of :strength
might come up to 5000, while the default value is 10.
Note, different :strength
values do not affect the operation performance.
Original image. 17Kb | -/blur/20/ 10Kb | -/blur/100/ 6Kb |
Blur region
-/blur_region/:two_dimensions/:two_coords/
-/blur_region/:two_dimensions/:two_coords/:strength/
Blurs the specified region of the image by the :strength
factor. The filtering mode is Gaussian Blur,
where :strength
parameter sets the blur radius — effect intensity. Technically,
:strength
controls the Gaussian Blur standard deviation multiplied by ten.
The value of :strength
might come up to 5000, while the default value is determined
automatically based on the size of the region.
Note, larger :strength
values do not affect the operation performance.
Original image. | -/blur_region/130x180/220,25/ | -/blur_region/30%x80%/50%,10%/20/ |
Blur faces
-/blur_region/faces/
-/blur_region/faces/:strength/
When faces
is specified the regions are selected automatically by utilizing face detection.
Original image. | -/blur-region/faces/ default strength | -/blur-region/faces/250/ stength 250 |
Unsharp masking
-/blur/:strength/:amount/
There is no specific operation for unsharp masking. Instead, you can adjust the
:amount
of the blur applied. :amount
can be set in the range from –200 to
100 and defaults to 100.
Where the :amount
of:
- 100 stands for the opaque blur image.
- 0 stands for no changes in the image, the output is equal to the original.
- Any negative number would mean subtracting the difference between the blurred and original images from the original. That is the unsharp masking behavior.
You can implement unsharp masking with a large blur :strength
(100;300) and a
small negative :amount
(–50;–10) to increase local contrast. Fine-tuned local
contrast gives a “pop” to an image and mimics the look created by camera
lenses. Local contrast enhancements let you minimize the effects of haze, lens
flare, and “dull look.”
When implemented with a small :strength
, unsharp masking increases image
sharpness. For instance, the /blur/10/-200/
transformation is the full
equivalent of /sharp/20/
with the exception that sharp
operates much faster.
You can combine unsharp masking with the sharp
operation
to increase both local contrast and sharpness.
Original image. 16Kb | -/blur/100/-50/ 19Kb | -/blur/100/-120/ 22Kb |
-/sharp/20/ 20Kb | -/blur/10/-200/ 20Kb | -/sharp/10/-/blur/90/-50/ 21Kb |
Sharpen
-/sharp/
-/sharp/:strength/
Sharpens an image, might be especially useful with images that were subjected to
downscaling. :strength
can be in the range from 0 to 20 and defaults to the
value of 5.
Downscaled image. 15Kb | -/sharp/10/ 17Kb | -/sharp/20/ 19Kb |