ImageCollage
ImageCollage[{image1,image2,…}]
creates a collage of images imagei.
ImageCollage[{w1image1,w2image2,…}]
creates a collage of images imagei based on their corresponding weights wi.
ImageCollage[image1w1,image2w2,…]
also creates a collage of images imagei based on their corresponding weights wi.
ImageCollage[{w1,w2,…}{image1,image2,…}]
also creates a collage of images imagei based on their corresponding weights wi.
ImageCollage[{{image1,w1},{image2,w2},…}]
also creates a collage of images imagei based on their corresponding weights wi.
ImageCollage[…,fitting]
uses the fitting method to create the collage.
ImageCollage[…,fitting,size]
creates a collage of the specified size.
Details and Options
- ImageCollage creates a collage of a list of images and can be used to create a compact visualization of photographs, graphics, etc.
- ImageCollage[w->{image1,image2,…}] assumes the same weight w for all imagei.
- Weights wi can be either of one of the following forms:
-
w final area proportional to w Scaled[s] final area proportional to s multiplied by the original area - Possible values for fitting include:
-
"Fill" fit the smaller dimension; crop the other if necessary "Fit" fit the whole image; keep the aspect ratio; pad if necessary "Stretch" stretch the image to fit by resampling - The following options can be specified:
-
Background GrayLevel[0.2] background color ImagePadding None padding size to use around each image ImageSize Automatic display size of the collage Method Automatic method to use for packing images Padding Automatic padding scheme to use around each image Resampling Automatic resampling method - Possible settings for ImagePadding are:
-
None no padding m the same padding on all sides {m,n} m pixels on left and right, n pixels on bottom and top {{left,right},{bottom,top}} different padding on different sides - Method can take one of the following settings:
-
"Rows" arrange in horizontal layers "Columns" arrange in vertical layers "Grid" a regular grid of images "ClosestPacking" closest packing from the top left
Examples
open allclose allBasic Examples (3)
Scope (4)
Weights (2)
With no weights specified, almost-equal weights are assumed:
Images will appear to have roughly the same area:
Absolute weights represent a relationship between image areas in the collage:
Scaled weights get multiplied with original image dimensions:
Use Scaled[1] as the weight for all images to preserve original image area ratios:
Compatible Quantity objects can also be used as weights:
Options (12)
Background (4)
By default, the background is filled with GrayLevel[0.2]:
Use Background->Transparent to create a collage with transparent background:
With Padding->Automatic, images are padded with the background color:
Method (5)
By default, the packing method is automatically selected:
The "ClosestPacking" method tries to find a packing while preserving relative weighted image areas:
The "Grid" method places the images in a regular grid:
The "Rows" method places images in horizontal layers:
Create vertical layers using Method->"Columns":
With Method->"Grid", by default all cells have the same size, equivalent to ItemSize->All:
Use ItemSize->Full to resize each grid cell to its full width and height:
ImagePadding (1)
Padding (1)
By default, with Padding->Automatic, images are padded with the same color as Background:
Use a different Background:
Applications (5)
Create a collage where images are weighted by their median intensity:
Create a collage of thumbnails of all test images in ExampleData:
Create a collage of a collection of Picasso's notable paintings:
Get images as well as their corresponding areas for these paintings:
Collage of paintings where each is shown at a size proportional to its original area:
Collage of images of sample buildings, weighted by their number of floors:
Properties & Relations (3)
ImageCollage works with all kinds of images:
ImageAssemble requires regular images:
Use ConformImages to preprocess the set:
Use Grid to visualize images in a regular grid:
Use WordCloud to assemble words in 2D layout:
Possible Issues (1)
Neat Examples (3)
Create a country population visualization by showing each country flag, weighted by its population:
Select countries that contribute to at least 0.2 percent of the world population:
Make a collage of 20 disks of random color and size:
Nestedly apply ImageCollage:
Text
Wolfram Research (2014), ImageCollage, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageCollage.html (updated 2015).
CMS
Wolfram Language. 2014. "ImageCollage." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/ImageCollage.html.
APA
Wolfram Language. (2014). ImageCollage. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageCollage.html