using ImageMagick;
using Ocr.Tesseract.Extensions;

namespace Ocr.Tesseract.Screenshots;

public class AddBorderProcessor : SingleImageProcessor
{
  private readonly int _thickness;

  public AddBorderProcessor(int thickness)
  {
    _thickness = thickness;
  }

  /// <inheritdoc />
  protected override MagickImage Process(MagickImage image) => _thickness > 0
    ? image.AddBorder(_thickness, MagickColors.White)
    : image;
}