protected override UIImage Transform(UIImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { using (var colorSpace = CGColorSpace.CreateDeviceGray()) { return(ColorSpaceTransformation.ToColorSpace(sourceBitmap, colorSpace)); } }
protected override UIImage Transform(UIImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { if (EnableSolidColor) { return(ToSolidColor(sourceBitmap, R, G, B, A)); } RGBAWMatrix = FFColorMatrix.ColorToTintMatrix(R, G, B, A); return(base.Transform(sourceBitmap, path, source, isPlaceholder, key)); }
protected override UIImage Transform(UIImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { if (_colorMatrix != null) { return(ToFilter(sourceBitmap, _colorMatrix)); } else { return(ToColorSpace(sourceBitmap, _colorSpace)); } }
protected override NSImage Transform(NSImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { if (_colorMatrix != null) { return(Helpers.MainThreadDispatcher.PostForResult <NSImage>(() => ToFilter(sourceBitmap, _colorMatrix))); } else { return(Helpers.MainThreadDispatcher.PostForResult <NSImage>(() => ToColorSpace(sourceBitmap, _colorSpace))); } }
protected override NSImage Transform(NSImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { if (EnableSolidColor) { return(Helpers.MainThreadDispatcher.PostForResult <NSImage>(() => ToSolidColor(sourceBitmap, R, G, B, A))); } RGBAWMatrix = FFColorMatrix.ColorToTintMatrix(R, G, B, A); return(base.Transform(sourceBitmap, path, source, isPlaceholder, key)); }
protected override UIImage Transform(UIImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { using (var effect = new CIPhotoEffectMono() { Image = sourceBitmap.CGImage }) using (var output = effect.OutputImage) using (var context = CIContext.FromOptions(null)) using (var cgimage = context.CreateCGImage(output, output.Extent)) { return(UIImage.FromImage(cgimage)); } }
protected override NSImage Transform(NSImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { switch (FlipType) { case FlipType.Vertical: throw new NotImplementedException(); case FlipType.Horizontal: throw new NotImplementedException(); default: throw new Exception("Invalid FlipType"); } }
protected override UIImage Transform(UIImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { switch (FlipType) { case FlipType.Vertical: return(new UIImage(sourceBitmap.CGImage, sourceBitmap.CurrentScale, UIImageOrientation.DownMirrored)); case FlipType.Horizontal: return(new UIImage(sourceBitmap.CGImage, sourceBitmap.CurrentScale, UIImageOrientation.UpMirrored)); default: throw new Exception("Invalid FlipType"); } }
protected override Bitmap Transform(Bitmap sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { switch (FlipType) { case FlipType.Vertical: return(Flip(sourceBitmap, 1, -1)); case FlipType.Horizontal: return(Flip(sourceBitmap, -1, 1)); default: throw new Exception("Invalid FlipType"); } }
protected override NSImage Transform(NSImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(Helpers.MainThreadDispatcher.PostForResult <NSImage>(() => { using (var inputImage = CIImage.FromCGImage(sourceBitmap.CGImage)) using (var filter = new CIPhotoEffectMono() { Image = inputImage }) using (var resultImage = new NSCIImageRep(filter.OutputImage)) { var nsImage = new NSImage(resultImage.Size); nsImage.AddRepresentation(resultImage); return nsImage; } })); }
protected override Bitmap Transform(Bitmap sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { double sourceWidth = sourceBitmap.Width; double sourceHeight = sourceBitmap.Height; Bitmap bitmap = Bitmap.CreateBitmap((int)sourceWidth, (int)sourceHeight, Bitmap.Config.Argb8888); bitmap.HasAlpha = true; using (Canvas canvas = new Canvas(bitmap)) using (Paint paint = new Paint()) { paint.AntiAlias = true; canvas.DrawColor(HexColor.ToColor()); canvas.DrawBitmap(sourceBitmap, 0, 0, paint); return(bitmap); } }
protected override BitmapHolder Transform(BitmapHolder bitmapSource, string path, Work.ImageSource source, bool isPlaceholder, string key) { if (EnableSolidColor) { ToReplacedColor(bitmapSource, R, G, B, A); return(bitmapSource); } RGBAWMatrix = FFColorMatrix.ColorToTintMatrix(R, G, B, A); return(base.Transform(bitmapSource, path, source, isPlaceholder, key)); }
protected override BitmapHolder Transform(BitmapHolder bitmapSource, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToRounded(bitmapSource, (int)Radius, CropWidthRatio, CropHeightRatio, BorderSize, BorderHexColor)); }
protected override Bitmap Transform(Bitmap sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToCropped(sourceBitmap, ZoomFactor, XOffset, YOffset, CropWidthRatio, CropHeightRatio)); }
protected override BitmapHolder Transform(BitmapHolder bitmapSource, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToRotated(bitmapSource, Degrees, CCW, Resize)); }
protected override NSImage Transform(NSImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(Helpers.MainThreadDispatcher.PostForResult <NSImage>(() => ToTransformedCorners(sourceBitmap, TopLeftCornerSize, TopRightCornerSize, BottomLeftCornerSize, BottomRightCornerSize, CornersTransformType, CropWidthRatio, CropHeightRatio))); }
protected override UIImage Transform(UIImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToRounded(sourceBitmap, (nfloat)Radius, CropWidthRatio, CropHeightRatio, BorderSize, BorderHexColor)); }
protected override Bitmap Transform(Bitmap sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToColorSpace(sourceBitmap, _colorMatrix)); }
protected override Bitmap Transform(Bitmap sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(RoundedTransformation.ToRounded(sourceBitmap, 0f, 1f, 1f, BorderSize, BorderHexColor)); }
protected override NSImage Transform(NSImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(Helpers.MainThreadDispatcher.PostForResult <NSImage>(() => ToSepia(sourceBitmap))); }
protected override Bitmap Transform(Bitmap sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToTransformedCorners(sourceBitmap, TopLeftCornerSize, TopRightCornerSize, BottomLeftCornerSize, BottomRightCornerSize, CornersTransformType, CropWidthRatio, CropHeightRatio)); }
protected override Bitmap Transform(Bitmap sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToBlurred(sourceBitmap, _context, (float)Radius)); }
protected override UIImage Transform(UIImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToSepia(sourceBitmap)); }
protected override BitmapHolder Transform(BitmapHolder bitmapSource, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToFlipped(bitmapSource, FlipType)); }
public ImageSourceBinding(Work.ImageSource imageSource, string path) { ImageSource = imageSource; Path = path; }
protected override BitmapHolder Transform(BitmapHolder bitmapSource, string path, Work.ImageSource source, bool isPlaceholder, string key) { ToColorSpace(bitmapSource, _rgbawMatrix); return(bitmapSource); }
protected override Bitmap Transform(Bitmap sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(ToGrayscale(sourceBitmap)); }
protected override NSImage Transform(NSImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(Helpers.MainThreadDispatcher.PostForResult <NSImage>(() => ToRounded(sourceBitmap, (nfloat)Radius, CropWidthRatio, CropHeightRatio, BorderSize, BorderHexColor))); }
protected override BitmapHolder Transform(BitmapHolder bitmapSource, string path, Work.ImageSource source, bool isPlaceholder, string key) { ToGrayscale(bitmapSource); return(bitmapSource); }
protected override NSImage Transform(NSImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key) { return(Helpers.MainThreadDispatcher.PostForResult <NSImage>(() => RoundedTransformation.ToRounded(sourceBitmap, 0f, 1f, 1f, BorderSize, BorderHexColor))); }