Exemplo n.º 1
0
        //Colorize Rename, Colorize Using IMG
        public static Bitmap TintImage(Bitmap img, Color C, float Value)
        {
            Bitmap coloredIMG = ImageConstruct.MatchColorImage(img, C);
            Bitmap greyScale  = Grayscale.CommonAlgorithms.RMY.Apply(img);
            Bitmap getAlpha   = ImageUtil.getARGBA(greyScale).Item1;

            coloredIMG = ImageMultiFilter.RGBA_replaceChannel(coloredIMG, null, null, null, getAlpha);
            coloredIMG = opacityFilter(coloredIMG, Value);

            List <Bitmap> imgsToOverlay = new List <Bitmap>();

            imgsToOverlay.Add(img);
            imgsToOverlay.Add(coloredIMG);
            return(ImageMultiFilter.OverlayImages(imgsToOverlay, 1, 1));
        }
Exemplo n.º 2
0
        public static Bitmap DropShadowIMG(Bitmap img, int RangeX, int RangeY, Color C, float sigma, int range, float Opacity)
        {
            Bitmap coloredIMG = ImageConstruct.MatchColorImage(img, C);
            Bitmap getAlpha   = ImageUtil.getARGBA(img).Item4;

            coloredIMG = ImageMultiFilter.RGBA_replaceChannel(coloredIMG, null, null, null, getAlpha);

            Bitmap movedIMG  = ImageUtil.moveImage(coloredIMG, RangeX, RangeY);
            Bitmap BluredIMG = BlurImage(movedIMG, sigma, range);

            //Bitmap intersectIMG = ImageMultiFilter.operationImages(BluredIMG, coloredIMG, Operations.operations["Intersect"]);
            Bitmap OpacityIMG = opacityFilter(BluredIMG, Opacity);

            return(OpacityIMG);
        }