namespace FileFlows.ImageNodes.Images;
///
/// Flow element to flip an image
///
public class ImageFlip : ImageNode
{
///
public override int Inputs => 1;
///
public override int Outputs => 1;
///
public override FlowElementType Type => FlowElementType.Process;
///
public override string HelpUrl => "https://fileflows.com/docs/plugins/image-nodes/image-flip";
///
public override string Icon => "fas fa-sync-alt";
///
/// Gets or sets if the image should be flipped vertically, otherwise its flipped horizontally
///
[Boolean(2)]
public bool Vertical { get; set; }
///
protected override Result PerformAction(NodeParameters args, string localFile, string destination)
=> Vertical
? args.ImageHelper.FlipVertically(localFile, destination, GetImageTypeFromFormat(), Quality)
: args.ImageHelper.FlipHorizontally(localFile, destination, GetImageTypeFromFormat(), Quality);
}