Description Usage Arguments Details
View source: R/image_modify_rgb.R
The function modifies the R, G, B values
of an image and is used in the same
way as image_modify_hsv
in this package. The
three channels can be modified separately.
The ways to modify include: setting values
to some specified values (set_*), adding (add_*),
multiplying the original values (mult_*),
rescaling the original values (rescale_*),
using a function to recompute values (fun_*).
The most useful way is to use some internal
curves that mimic those PS-like apps.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
x |
an image created
by |
set_r |
set r values with specific values. |
add_r |
add specific values to current R values. |
mult_r |
multiply the current values with specific values. |
rescale_r |
a length 2 numeric vector
specifying the desired range of R values,
e. g., |
fun_r |
your own modifying function
(e. g., |
set_g, add_g, mult_g, rescale_g, fun_g |
parameters to change G values. Used in the same way as those for R. See above. |
set_b, add_b, mult_b, rescale_b, fun_b |
parameters to change B values. Used in the same way as those for R. See above. |
result |
the default is "magick", the output is
a magick picture. When it is "raster", a matrix is created
which can be use as a raster
for |
res |
when the result is a magick picture, the
|
Several internal curves can be used.
Please see the Details part
of image_modify_hsv
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.