MobileImageSource.cs 867 B

1234567891011121314151617181920212223242526272829
  1. namespace InABox.Mobile
  2. {
  3. public abstract class MobileImageSource<TSource, TOptions> : MobileDocumentSource<TOptions>
  4. where TOptions : MobileImageOptions<TSource>, new()
  5. where TSource : MobileDocumentSource
  6. {
  7. protected MobileImageSource(TOptions options) : base(options)
  8. {
  9. }
  10. protected override void ApplyOptions(MobileDocument document)
  11. {
  12. if (Options == null)
  13. return;
  14. //if (Options.Constraints != null)
  15. // document.Scale(Options.Constraints.Value);
  16. //if (Options.Compression != null && Options.Compression != 100)
  17. // document.ConvertToJpg(Options.Compression.Value);
  18. if (Options.PDF == true)
  19. document.ConvertToPDF();
  20. }
  21. }
  22. }