This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PropertyChanged; | |
using System.ComponentModel; | |
using ImageFilterSample.Helpers; | |
namespace ImageFilterSample.Models | |
{ | |
public class Filter : INotifyPropertyChanged | |
{ | |
public FilterType Type { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows.Input; | |
using FFImageLoading.Forms; | |
using ImageFilterSample.Helpers; | |
using Xamarin.Forms; | |
namespace ImageFilterSample.Controls | |
{ | |
public class FilterImage : CachedImage | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="ImageFilterSample.MainPage" | |
xmlns:controls="clr-namespace:ImageFilterSample.Controls" | |
Title="Filter Image Sample"> | |
<ContentPage.Content> | |
<StackLayout VerticalOptions="FillAndExpand" Spacing="0"> | |
<AbsoluteLayout VerticalOptions="FillAndExpand"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.ObjectModel; | |
using System.Windows.Input; | |
using ImageFilterSample.Helpers; | |
using ImageFilterSample.Models; | |
using Xamarin.Forms; | |
using System.ComponentModel; | |
using System.Threading.Tasks; | |
using System.Linq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FFImageLoading.Forms.Droid; | |
using FFImageLoading.Forms; | |
using Xamarin.Forms; | |
using ImageFilterSample.Controls; | |
using ImageFilterSample.Droid.Renderers; | |
using Android.Graphics; | |
using ImageFilterSample.Helpers; | |
using Xamarin.Forms.Platform.Android; | |
using System.Threading.Tasks; | |
using Android.Widget; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FFImageLoading.Forms.Touch; | |
using FFImageLoading.Forms; | |
using Xamarin.Forms; | |
using ImageFilterSample.Controls; | |
using ImageFilterSample.iOS.Renderers; | |
using ImageFilterSample.Helpers; | |
using UIKit; | |
using Xamarin.Forms.Platform.iOS; | |
using System.Threading.Tasks; | |
using CoreImage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async void ApplyFilter(FilterType filterType) | |
{ | |
if (currentFilterType == filterType) | |
return; | |
var filterImage = Element as FilterImage; | |
//originalBitmap = await GetBitmapAsync(filterImage.OriginalSource); | |
using (Bitmap originalBitmap = await GetBitmapAsync(filterImage.OriginalSource)) | |
{ | |
var oldFilteredBitmap = filteredBitmap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async void ApplyFilter(FilterType filterType) | |
{ | |
if (currentFilterType == filterType) | |
return; | |
var filterImage = Element as FilterImage; | |
var handler = GetHandler(filterImage.OriginalSource); | |
using (UIImage originalImage = await handler.LoadImageAsync(filterImage.OriginalSource)) | |
{ | |
switch (filterType) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Android.App; | |
using Android.Content; | |
using Android.OS; | |
using Android.Runtime; | |
using Android.Views; | |
using Android.Widget; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ZoomableApp.iOS.Renderers; | |
using UIKit; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
using System.Linq; | |
[assembly: ExportRenderer(typeof(ScrollView), typeof(ZoomScrollViewRenderer))] | |
namespace ZoomableApp.iOS.Renderers | |
{ | |
public class ZoomScrollViewRenderer : ScrollViewRenderer |
OlderNewer