Esempio n. 1
0
 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,
         }
     }
 });
Esempio n. 2
0
 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()
             }
         }
     }
 });