Click on 'Edit Parameter Interface' and add vector2 'ar' and float 'ratio'.
Horizontal Crop:
if ( ch("ratio")<1, (res("../`opinput('.',0)`", D_XRES) - ch("hcrop2")) / 2, 0 ) if ( ch("ratio")>1, res("../`opinput('.',0)`", D_XRES), (res("../`opinput('.',0)`", D_YRES) / ch("ary")) * ch("arx") )
if ( ch("ratio")>1, (res("../`opinput('.',0)`", D_YRES) - ch("vcrop2")) / 2, 0 ) if ( ch("ratio")<1, res("../`opinput('.',0)`", D_YRES), (res("../`opinput('.',0)`", D_XRES) / ch("arx")) * ch("ary") )
res("../`opinput('.',0)`", D_XRES) / res("../`opinput('.',0)`", D_YRES)
Features:
- Procedural path and resolution of the input node
- Custom aspect ratio
- Supports vertical and horizontal aspect ratios
- Packed into HDA

Many thanks to repliers.