public BuildNode Distort(uint w, uint h, float?sharpenPercent = null, InterpolationFilter?downFilter = null, InterpolationFilter?upFilter = null) => To(new { resample_2d = new { w, h, down_filter = downFilter?.ToString(), up_filter = upFilter?.ToString(), hints = new { sharpen_percent = sharpenPercent, } } });
public BuildNode ConstrainWithin(uint?w, uint?h, float?sharpenPercent, InterpolationFilter?downFilter, InterpolationFilter?upFilter, ScalingFloatspace?interpolationColorspace, ResampleWhen?resampleWhen) => To(new { constrain = new { within = new { w, h, hints = new { sharpen_percent = sharpenPercent, down_filter = downFilter?.ToString(), up_filter = upFilter?.ToString(), scaling_colorspace = interpolationColorspace?.ToString().ToLowerInvariant(), resample_when = resampleWhen?.ToString().ToLowerInvariant() } } } });