using System.Threading.Tasks; using InABox.Core; using InABox.Mobile; namespace PRS.Mobile { public class DigitalFormEmbeddedImage : DigitalFormEmbeddedMedia { protected override bool IsVideo => false; protected override bool DisableLibrary => Definition.Properties.DisableLibrary; protected override bool Secure => Definition.Properties.Secure; protected override bool Required => Definition.Properties.Required; protected override Task CaptureMedia() { return MobileDocument.From(new MobileDocumentCameraSource()); } protected override Task SelectMedia() { return MobileDocument.From(new MobileDocumentPhotoLibrarySource()); } protected override byte[] CreateThumbnail(byte[] data, float maxwidth = 200, float maxheight=200) { return MobileUtils.ImageTools.CreateThumbnail(data, maxwidth, maxheight); } } }