img_edit | R Documentation |
This function uses the magick
package to edit the color and perform other
image manipulations on a background image. It can be useful if you want to
highlight certain features of these images.
img_edit(
spe,
sampleid,
image_id = "lowres",
channel = NA,
brightness = 100,
saturation = 100,
hue = 100,
enhance = FALSE,
contrast_sharpen = NA,
quantize_max = NA,
quantize_dither = TRUE,
equalize = FALSE,
normalize = FALSE,
transparent_color = NA,
transparent_fuzz = 0,
background_color = NA,
median_radius = NA,
negate = FALSE
)
spe |
A
SpatialExperiment-class
object. See |
sampleid |
A |
image_id |
A |
channel |
A |
brightness |
A |
saturation |
A |
hue |
A |
enhance |
A |
contrast_sharpen |
A |
quantize_max |
A |
quantize_dither |
A |
equalize |
A |
normalize |
A |
transparent_color |
A |
transparent_fuzz |
A |
background_color |
A |
median_radius |
A |
negate |
A |
The magick
functions are used in the sequence represented by the arguments
to this function. You can alternatively use this function sequentially. Or
directly use the magick
package.
A magick
image object such as the one returned by
magick::image_read.
Other Image editing functions:
img_update()
,
img_update_all()
if (enough_ram()) {
## Obtain the necessary data
if (!exists("spe")) spe <- fetch_data("spe")
## Reduce brightness to 25%
x <- img_edit(spe, sampleid = "151507", brightness = 25)
plot(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.