Skip to content

Upscale

Namespace Nfty.Core.Imaging in assembly Nfty.Core.

public static class Upscale

Whole-pixel enlargement for export: every source pixel becomes an exact factor-by-factor block, so pixel art stays pixel art. No resampler is involved.

Methods

By(Image<Rgba32>, int)

public static Image<Rgba32> By(Image<Rgba32> src, int factor);

Enlarges src by an integer factor.

Parameters

  • src (Image<Rgba32>) - The image; left untouched.
  • factor (int) - 1, 2, 4 or 8.

Returns. A new image the caller owns.

Exceptions

  • ArgumentOutOfRangeException - The factor is not 1, 2, 4 or 8.