LC Image Grid 🖼️:
LCImageGrid arranges every image in an input batch into a single visual grid, making it useful for comparing variations, reviewing generated results, creating contact sheets, or presenting multiple images together. Images are placed from left to right and then from top to bottom, with the number of columns limited by your chosen maximum. The node calculates a shared cell size from the largest image, centers smaller images within that size, and can add spacing, internal padding, outlines around individual cells, and a border around the complete grid. This produces a consistent composition even when the source images have different dimensions. Color values are read from hexadecimal strings such as #000000 or #FFFFFF. If the input batch contains no images, the node creates a 64 × 64 black image instead of returning an empty result.
LC Image Grid 🖼️ Input Parameters:
images
The batch of images that you want to arrange. Each image is converted into an RGB image and placed into the grid in its original batch order. The node uses the largest image width and height to establish a shared cell size, so smaller images are centered inside matching cells rather than changing the grid structure. Images with more than three color channels use their first three channels, while grayscale images are converted to RGB. An empty batch produces a 64 × 64 black image.
max_columns
Sets the maximum number of images that can appear in one row. Rows are filled from left to right and then continue on the next row. The minimum value is 1, the maximum is 64, the step is 1, and the default is 3. The actual number of columns is also limited by the number of input images, so a batch of two images with max_columns set to 3 creates two columns rather than leaving an unused third column. Lower values create taller grids, while higher values create wider grids.
gap
Controls the empty space between neighboring cells, measured in pixels. The minimum is 0, the maximum is 256, the step is 1, and the default is 8. A value of 0 places cells directly next to each other, while larger values make the separation between images more visible. The gap uses the background color and increases the final grid dimensions.
cell_pad
Adds space inside each cell around the original image before the cell is aligned with the other cells. The minimum is 0, the maximum is 256, the step is 1, and the default is 4. Padding is added to both sides of the width and both sides of the height, so a value of 4 adds up to eight pixels to each dimension before shared cell sizing. The padding is filled with bg_color and can help separate the artwork from its outline or create a framed thumbnail appearance.
outline_thickness
Sets the thickness of the outline drawn around every individual cell image. The minimum is 0, the maximum is 64, the step is 1, and the default is 2. A value of 0 disables cell outlines. Increasing this value makes each image stand out more clearly, but also increases the width and height of every cell and therefore increases the final grid size. The outline uses outline_color.
border_thickness
Sets the thickness of the outer border surrounding the complete grid. The minimum is 0, the maximum is 256, the step is 1, and the default is 2. A value of 0 removes the outer border. Increasing the value adds pixels to all four sides of the finished grid, using border_color. This border is separate from the outlines drawn around individual cells.
bg_color
Defines the background color used for gaps, cell padding, and any unused space around smaller images inside their cells. The default is #000000. Enter a hexadecimal RGB color in the form #RRGGBB; three-character shorthand such as #FFF is also accepted and expanded to its six-character equivalent. If the value is missing or cannot be interpreted as a valid hexadecimal color, the node falls back to black.
outline_color
Defines the color of the outline around each individual cell. The default is #FFFFFF. Enter a hexadecimal RGB color such as #FFFFFF for white or #FF0000 for red. Three-character shorthand such as #FFF is accepted. If the value is invalid, the node falls back to white.
border_color
Defines the color of the outer border around the entire grid. The default is #000000. Enter a hexadecimal RGB color such as #000000 for black or #FFFFFF for white. Three-character shorthand such as #000 is accepted. If the value is invalid, the node falls back to black.
LC Image Grid 🖼️ Output Parameters:
image
The finished image grid containing all input images arranged into rows and columns. The result is returned as a single RGB image batch containing one image, with pixel values represented in the normal IMAGE format. The output dimensions depend on the largest input image, the number of columns and rows, cell padding, outlines, gaps, and outer border. Smaller images are centered within the shared cell size, and any surrounding area uses the selected background color.
LC Image Grid 🖼️ Usage Tips:
- Use
max_columnsvalues between2and5for contact sheets that are easy to inspect. Use1for a vertical comparison list or a larger value when you need a compact overview. - Keep
gapat0or4for a tight montage, and use values such as8to16when you want clear separation between generated variations. - Set
cell_padto0when preserving the most compact layout is important. Use4or more when you want visible background space around each image. - Use
outline_thicknesswith a contrastingoutline_colorto separate adjacent images, especially when the artwork contains dark or similarly colored edges. Set it to0for a minimal presentation. - Use
border_thicknessto give the complete montage a clean frame. Set it to0when the grid will be placed inside another composition that already provides its own border. - Choose a light
bg_colorsuch as#FFFFFFfor bright presentation sheets and a dark value such as#000000for artwork that benefits from a dark surround. The background also fills padding and gaps, so preview the color in relation to the images. - Remember that the largest input width and height determine the shared cell size. Mixing very large and very small images can create substantial empty space around the smaller images; resize the source images first if a tighter grid is needed.
- For a simple three-column review sheet, the default settings provide a practical starting point:
max_columns3,gap8,cell_pad4,outline_thickness2, andborder_thickness2. - Use valid hexadecimal colors with six digits, such as
#202020or#EAEAEA, to avoid accidental fallback colors and make the result predictable.
LC Image Grid 🖼️ Common Errors and Solutions:
Input batch is empty
- Explanation: No images were available in the
imagesinput. The node handles this case by returning a 64 × 64 black image, so the result may appear blank rather than showing an error. - Solution: Connect an image-producing node to
imagesand confirm that the upstream node is generating at least one image before running the grid.
Invalid hexadecimal color value
- Explanation: A color input does not contain a valid hexadecimal RGB value. The node accepts six-character values such as
#336699and three-character shorthand such as#369. Invalid values are replaced with fallback colors: black forbg_colorandborder_color, and white foroutline_color. - Solution: Enter colors using the format
#RRGGBB, for example#000000,#FFFFFF, or#336699. Include only hexadecimal characters after the optional#.
Grid contains unexpected empty space
- Explanation: Every cell uses the width and height of the largest input image, so smaller images are centered with background space around them. Additional empty space can also come from
cell_pad,gap, or the selected outline and border settings. - Solution: Resize input images to a more consistent size before using the node, reduce
cell_padandgap, or reduce outline and border thickness.
Output grid is larger than expected
- Explanation: The final dimensions include the shared cell dimensions, the number of rows and columns, gaps between cells, outlines around cells, and the outer border. Large source images or high spacing values can therefore produce a large output.
- Solution: Reduce
max_columnsonly when a taller layout is acceptable, lowergap,cell_pad,outline_thickness, orborder_thickness, and resize oversized source images before creating the grid.
Images are touching or difficult to distinguish
- Explanation: A gap of
0places cells directly next to each other, and an outline thickness of0removes the visual boundary around each cell. Similar image edges or matching background colors can make the boundaries hard to see. - Solution: Increase
gapslightly, add anoutline_thicknessof1or2, and choose anoutline_colorthat contrasts with the image edges andbg_color.
Images appear cropped or reduced inside cells
- Explanation: The node keeps each image's aspect ratio while fitting it into the shared cell size. If an image is larger than the available cell dimensions, it is scaled down to fit. The node does not enlarge smaller images, and it does not stretch images to fill the entire cell.
- Solution: Check the dimensions of the source images and use consistently sized inputs when you need uniform visual scale. Increase the source resolution before the grid if the images need to remain large.
Unexpected black, white, or default-colored areas
- Explanation: Invalid color strings trigger fallback colors, and background-colored regions are intentionally used for gaps, padding, and space around smaller images. These areas are not part of the source artwork.
- Solution: Verify all three color inputs, use valid values such as
#202020or#FFFFFF, and adjustcell_padandgapif the surrounding areas are larger than intended.
