Visit ComfyUI Online for ready-to-use ComfyUI environment
Versatile image manipulation node for precise transformations and enhancements, ideal for AI artists.
The Transform Image (mtb) node is designed to provide a versatile and powerful way to manipulate images through various transformations. This node allows you to apply translations, rotations, zooms, and shears to an image, making it an essential tool for AI artists looking to enhance or modify their visual content. By leveraging this node, you can achieve precise control over the positioning, scaling, and orientation of your images, which can be particularly useful for creating dynamic compositions or preparing images for further processing. The node also offers options for handling image borders and filling areas created by transformations, ensuring that the final output maintains a high-quality appearance.
This parameter expects a tensor representation of the image you wish to transform. The image tensor should be in the format of (frames_count, frame_height, frame_width, frame_channel_count). This input is crucial as it serves as the base image upon which all transformations will be applied.
This parameter specifies the horizontal translation of the image in pixels. Positive values move the image to the right, while negative values move it to the left. This allows you to shift the image horizontally within the frame. There is no strict minimum or maximum value, but typical values range from -100 to 100 pixels.
This parameter specifies the vertical translation of the image in pixels. Positive values move the image downwards, while negative values move it upwards. This allows you to shift the image vertically within the frame. Similar to the x parameter, typical values range from -100 to 100 pixels.
This parameter controls the scaling factor of the image. A value greater than 1.0 zooms into the image, making it larger, while a value less than 1.0 zooms out, making it smaller. The zoom parameter allows for precise control over the image size, with typical values ranging from 0.5 to 2.0.
This parameter specifies the rotation angle of the image in degrees. Positive values rotate the image clockwise, while negative values rotate it counterclockwise. This parameter is essential for adjusting the orientation of the image, with typical values ranging from -180 to 180 degrees.
This parameter defines the shear factor of the image, which skews the image along the x and y axes. This can create a slanting effect, adding a dynamic perspective to the image. Typical values for shear range from -30 to 30 degrees.
This parameter determines how the borders of the image are handled during transformations. Options include "edge" (default), which extends the edge pixels, and other modes like "constant" where a constant color is used to fill the borders. This ensures that the transformed image maintains a visually appealing border.
This parameter specifies the color used to fill areas created by transformations when the border_handling is set to "constant". The color should be provided in a hex format (e.g., "#FFFFFF" for white). This parameter ensures that the filled areas blend seamlessly with the rest of the image.
The output is a tensor representation of the transformed image. This tensor maintains the same format as the input image tensor (frames_count, frame_height, frame_width, frame_channel_count). The transformed image reflects all the applied translations, rotations, zooms, and shears, providing a modified version of the original image ready for further use or processing.
© Copyright 2024 RunComfy. All Rights Reserved.