LayerStyle

2167
By chflame
Updated 15 days ago
View on GitHub →See Common Issues →

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.

Available Nodes

LayerUtility: LayerImageTransform

LayerUtility: LayerImageTransform Documentation

Overview

The LayerUtility: LayerImageTransform node is part of the ComfyUI LayerStyle package, which allows users to manipulate images by performing various transformations. This node is particularly useful for graphic designers and digital artists who need to adjust the appearance of image layers in terms of location, size, orientation, and other properties.

Functionality

The primary function of the LayerUtility: LayerImageTransform node is to apply transformations to input images based on user-defined parameters. These transformations include translation, scaling, rotation, mirroring, and resizing by specified methods alongside anti-aliasing for enhanced image quality.

Inputs

The node accepts the following inputs:

  • Image: The target image or set of images to transform.
  • X: The x-coordinate displacement for translating the image. It allows a wide range of values, both positive and negative.
  • Y: The y-coordinate displacement for translating the image, also allowing a similar broad range.
  • Mirror: Determines if the image should be mirrored. Options include 'None', 'horizontal', and 'vertical' mirroring.
  • Scale: A scaling factor to adjust the size of the image. The default value is 1, indicating no scaling, but can be increased or decreased.
  • Aspect Ratio: Adjusts the aspect ratio of the image scale operation. Default is 1 for no distortion.
  • Rotate: Specifies the degree of rotation for the image. Allows a very wide range of rotation angles.
  • Transform Method: Defines the method for resizing the image, with options like 'lanczos', 'bicubic', and others to choose from.
  • Anti-aliasing: A parameter that smooths the image edges, with values ranging from 0 to 16, where higher values provide better quality.

Outputs

The node outputs a single transformed image as its result:

  • Image: The resulting image after all specified transformations have been applied. This image carries the modified characteristics according to the input transformations.

Usage in ComfyUI Workflows

In ComfyUI, the LayerUtility: LayerImageTransform node can be inserted into workflows where image manipulation is required. Typical use cases might include adjusting images for layout design, creating effects through rotation and mirroring, or resizing them to fit specific dimensions within a graphic composition.

For instance, a user might employ this node to rotate and scale layer images for creative effects within a layered design project. Moreover, combining this node with other image processing nodes in ComfyUI can lead to more complex and sophisticated graphic design workflows.

Special Features and Considerations

  • Mirror Transformations: Offers straightforward controls to flip images along horizontal or vertical axes, providing flexibility for symmetrical design adjustments.
  • High-Quality Resizing: The node supports different methods for resizing images, such as 'lanczos' and 'bicubic', which can ensure high-quality results, especially important for professional graphic design projects.
  • Comprehensive Adjustment Range: With broad ranges for translation, rotation, and scaling, this node allows users to effectively transform images to meet intricate project requirements.
  • Anti-Aliasing: The inclusion of an anti-aliasing parameter ensures smooth transformations without jagged edges, which is crucial for maintaining professional-grade visual quality.
  • Seamless Integration: As part of a larger UI workflow, this node easily integrates and supports the creation of elaborate image manipulation pipelines.

The LayerUtility: LayerImageTransform node offers powerful capabilities for manipulating images with precision and ease, making it an essential tool for anyone involved in graphic design or digital art within the ComfyUI framework.