Exemple #1
0
        protected override async Task InternalExecute()
        {
            try
            {
                var picker = new FileOpenPicker {
                    SuggestedStartLocation = PickerLocationId.Downloads
                };
                picker.FileTypeFilter.Add(".cube");

                // picker.FileTypeFilter.Add(".3dl");
                var files = await picker.PickMultipleFilesAsync();

                if (files != null)
                {
                    foreach (var file in files)
                    {
                        var lutinfo = new LutInfo
                        {
                            Title = file.DisplayName,
                            Id    = Guid.NewGuid().ToString()
                        };
                        await lutinfo.SaveToFile(await App.GetLutsFolder(), file);

                        Model.InstalledLuts.Add(lutinfo);
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex);
            }
        }
Exemple #2
0
        /// <summary>
        /// Retrieves the image stream by Applying the Unmap Filter
        /// </summary>
        /// <param name="imageId">Image Id</param>
        /// <param name="lutInfo">The parameters used to process the image</param>
        /// <returns>An StreamContent of <see cref="StreamContent" /> object</returns>
        public async Task <Stream> UnmapFilter(string imageId, LutInfo lutInfo)
        {
            var response = await Client.PostAsJsonAsync("images/" + imageId + "/filters/unmap", lutInfo);

            response.EnsureSuccessStatusCode();
            return(await response.Content.ReadAsStreamAsync());
        }