Пример #1
0
        public FirstViewBannerItemTemplate()
        {
            InitializeComponent();

            cachedImage.Transformations.Add(new ColorSpaceTransformation
            {
                RGBAWMatrix = FFColorMatrix.ColorToTintMatrix(64, 64, 64, 128)
            });
        }
Пример #2
0
        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));
        }
Пример #3
0
        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);
        }