public FirstViewBannerItemTemplate() { InitializeComponent(); cachedImage.Transformations.Add(new ColorSpaceTransformation { RGBAWMatrix = FFColorMatrix.ColorToTintMatrix(64, 64, 64, 128) }); }
protected override Bitmap Transform(Bitmap sourceBitmap, string path, FFImageLoading.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, FFImageLoading.Work.ImageSource source, bool isPlaceholder, string key) { // Only do this if its a grayscale image. if (IsGrayScale(sourceBitmap)) { if (EnableSolidColor) { return(ToSolidColor(sourceBitmap, R, G, B, A)); } RGBAWMatrix = FFColorMatrix.ColorToTintMatrix(R, G, B, A); return(base.Transform(sourceBitmap, path, source, isPlaceholder, key)); } return(sourceBitmap); }