/// <summary>
        /// Static factory
        /// </summary>
        /// <param name="storageFile"></param>
        /// <returns></returns>
        public static async Task <ImageFileFrameSource> CreateFromStorageFileAsyncTask(
            StorageFile storageFile)
        {
            var result = new ImageFileFrameSource();
            await result.GetFrameFromFileAsync(storageFile);

            return(result);
        }
Exemple #2
0
        /// <summary>
        /// Static factory
        /// </summary>
        /// <param name="storageFile"></param>
        /// <param name="imageDescriptor"></param>
        /// <returns></returns>
        public static async Task <ImageFileFrameSource> CreateFromStorageFileAsyncTask(
            StorageFile storageFile,
            ISkillFeatureImageDescriptor imageDescriptor)
        {
            var result = new ImageFileFrameSource()
            {
                m_desiredImageDescriptor = imageDescriptor
            };
            await result.GetFrameFromFileAsync(storageFile);

            return(result);
        }