Nodes/comfyui_cv/CV Transform (Rotate/Scale/Shift)
ComfyUI Node

CV Transform (Rotate/Scale/Shift)

Rotates around the center, scales, shifts and/or flips the image in one step (cv2.warpAffine under the hood).

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Transform (Rotate/Scale/Shift)
  • image
  • IMAGE
angle0.0
zoom1.00
shift_x0.00
shift_y0.00
flipnone
interpolationINTER_LINEAR
borderBORDER_CONSTANT
Categoryimage/CV

Inputs (8)

NameTypeDefaultDescription
imageIMAGEInput image. A batch is processed frame by frame.
angleFLOAT0.0-3600–3600Rotation in degrees, counter-clockwise.
zoomFLOAT1.000.01–16Uniform scale around the center. 1.0 = no change.
shift_xFLOAT0.00-16384–16384Horizontal shift in pixels.
shift_yFLOAT0.00-16384–16384Vertical shift in pixels.
flipCOMBOnoneOptional mirror applied before rotate/scale: horizontal, vertical, or both.
interpolationCOMBOINTER_LINEARResampling filter for the warp. NEAREST keeps hard edges; LINEAR/CUBIC are smoother for photos.
borderCOMBOBORDER_CONSTANTWhat to fill the uncovered areas with (CONSTANT = black).

Outputs (1)

NameTypeDescription
IMAGEIMAGE