Wolfram Research

Function Repository Resource:

PlaceholderImage

Source Notebook

Create a placeholder image of a specified dimension

Contributed by: Arnoud Buzing

ResourceFunction["PlaceholderImage"][width,height]

creates a placeholder image with the specified dimensions.

ResourceFunction["PlaceholderImage"][width,height,bgcolor]

creates a placeholder image with the specified dimensions and background color.

Details and Options

The font color is automatically chosen as either black or white depending on the background color.

Examples

Basic Examples

Create a standard placeholder image:

In[1]:=
ResourceFunction["PlaceholderImage"][300, 200]
Out[1]=

Create a placeholder image with a yellow background:

In[2]:=
ResourceFunction["PlaceholderImage"][300, 200, Yellow]
Out[2]=

Create a placeholder image with a brown background:

In[3]:=
ResourceFunction["PlaceholderImage"][300, 200, Brown]
Out[3]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

See Also

License Information