namespace InABox.Avalonia
{
    public abstract class MobileImageSource<TSource, TOptions> : MobileDocumentSource<TOptions>
        where TOptions : MobileImageOptions<TSource>, new()
        where TSource : MobileDocumentSource
    {
        
        protected MobileImageSource(TOptions options) : base(options)
        {
        }
        
        protected override void ApplyOptions(MobileDocument document)
        {
            if (Options == null)
                return;
            
            //if (Options.Constraints != null)
            //    document.Scale(Options.Constraints.Value);
            
            //if (Options.Compression != null && Options.Compression != 100)
            //    document.ConvertToJpg(Options.Compression.Value);
            
            if (Options.PDF == true)
                document.ConvertToPDF();
        }


    }
}