Message Boards Message Boards

0
|
3257 Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Concatenate a list of images to form a new image?

Posted 4 years ago

Is there a function to concatenate a 1-dimensional list of same-size, same colorspace images into a single image? For example, how to concatenate list simeonRast into a {156, 56} image:

simeonRast = Table[Rasterize[Style[StringPart["Simeon", n], Hue[(n - 1)/6], 48]], {n, 1, 6}]

More generally, how to concatenate an mXn list of compatible images into a mosaic? For example, a {114, 148} image from greekRast:

greekRast = Table[Rasterize[Style[Extract[Alphabet["Greek"], ((i - 1)*6) + j], 32]], {i, 4}, {j, 6}]

Thank you in advance :-)

POSTED BY: Richard Frost
2 Replies

As a first guess you may try:

ImageCollage[Flatten@greekRast]

but it might be better in this case to make sure that all images have identical size and use ImageAssemble:

imgDim = ImageDimensions[greekRast[[1, 1]]];
greekRast2 = Map[ImageResize[#, imgDim] &, greekRast, {2}];
ImageAssemble[greekRast2]

enter image description here

POSTED BY: Henrik Schachner

ConformImages might be useful to make all your images the same in size and type, after which you can use ImageAssemble as Henrik said…

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract