
Retrieve an image for a given PhyloPic uuid
Source:R/get_phylopic.R, R/phylopic_utils.R
get_phylopic.RdThis retrieves a PhyloPic silhouette as a vectorized or rasterized object.
Arguments
- uuid
character. A PhyloPic image uuid.- format
character. Format of the image. To return a vectorized image, use "vector". To return a rasterized image, use "raster" and specify a desiredheight.- height
numeric. Ifformatis "raster", this is the desired height of the raster image in pixels. This is ignored ifformatis "vector".- preview
logical. IfpreviewisTRUE, the returned image is plotted. Defaults toFALSE.- x
A Picture or png array object, e.g., from using
get_phylopic().- ...
Ignored
Value
If format is "vector", a Picture object
is returned. If format is "raster", a png array representing the
rasterized image is returned. Either way, the uuid and download url are
included as the "uuid" and "url" attributes, respectively.
Details
The height argument is ignored if the format argument is not set
to "raster". If format is "raster", the height argument specifies the
height of the desired raster object. The width of this raster object will
be determined by the original aspect ratio of the silhouette. If a
pre-rendered raster exists with the desired dimensions, it will be
downloaded from PhyloPic. If not, the vector image from PhyloPic will be
used to render a raster object of the desired size.