Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Add bump to an image
ResourceFunction["ImageBump"][img] filters the pixels in img to give the impression of 3D texture. Bright pixels appear raised, and dark pixels appear sunken. | |
ResourceFunction["ImageBump"][img,r] filters with a radius of r, which can have values of 1, 2 or 3. | |
ResourceFunction["ImageBump"][img1,img2] filters img2 to add texture to img1. | |
ResourceFunction["ImageBump"][img1,img2,r] filters img2 using a radius of r to add texture to img1. |
"LightPosition" | "NW" | which corner the light appears to come from |
"Intensity" | .75 | how intense the bump appears to be |
Add bump to an image:
In[1]:= | ![]() |
Out[2]= | ![]() |
Add bump with a radius of 3 to an image:
In[3]:= | ![]() |
Out[4]= | ![]() |
Add bump from one image to another:
In[5]:= | ![]() |
Out[6]= | ![]() |
The images for ImageBump[img1,img2] may be different sizes. If either dimension of img2 is smaller than that of img1, it reflects and tiles:
In[7]:= | ![]() |
Out[8]= | ![]() |
If a dimension of img2 is larger, it covers img1 starting in the top left corner:
In[9]:= | ![]() |
Out[10]= | ![]() |
The option "LightPosition" has four possible settings: "NW" (default), "NE", "SE" and "SW":
In[11]:= | ![]() |
Out[12]= | ![]() |
The option "Intensity" can take any real number i, although 0<i<1 gives the best results:
In[13]:= | ![]() |
Out[14]= | ![]() |
Give a photo a subtle pop:
In[15]:= | ![]() |
Out[16]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License