コード例 #1
0
        public IPicture Filter(IPicture image)
        {
            PictureProvider p = new PictureProvider();

            p.SavePicture(image, $"..\\Images\\PictureFiltrada{contador}.jpg");
            contador += 1;
            return(image);
        }
コード例 #2
0
ファイル: FilterSaveImage.cs プロジェクト: Fran1611/Repos
        public IPicture Filter(IPicture image)
        {
            IPicture        savePicture = image.Clone();
            PictureProvider p           = new PictureProvider();

            p.SavePicture(savePicture, "NewImage.jpg");
            return(savePicture);
        }
コード例 #3
0
        public bool Condition(IPicture image)
        {
            PictureProvider p = new PictureProvider();

            p.SavePicture(image, path);
            cog.Recognize(path);
            return(cog.FaceFound);
        }
コード例 #4
0
        public IPicture Filter(IPicture image)
        {
            contador += 1;
            PictureProvider p2 = new PictureProvider();

            p2.SavePicture(image, $"..\\Adds\\{contador.ToString()}.jpg");
            return(image);
        }
コード例 #5
0
        public IPicture Filter(IPicture image)
        {
            count++;
            IPicture        savePicture = image.Clone();
            PictureProvider p           = new PictureProvider();

            p.SavePicture(savePicture, $@"NewImage{count}.jpg");
            return(savePicture);
        }
コード例 #6
0
        public IPicture Filter(IPicture image)
        {
            Count++;
            IPicture        pic      = image.Clone();
            PictureProvider picSaved = new PictureProvider();

            picSaved.SavePicture(pic, $@"FilteredImage{Count}.jpg");
            return(pic);
        }
コード例 #7
0
        public IPicture Filter(IPicture image)
        {
            PictureProvider p = new PictureProvider();

            p.SavePicture(image, $"..\\Images\\TwitterPictureTemp.jpg");
            var twitter = new TwitterImage(consumerKey, consumerKeySecret, accessToken, accessTokenSecret);

            Console.WriteLine(twitter.PublishToTwitter("Imagen Filtrada", $"..\\Images\\TwitterPictureTemp.jpg"));
            return(image);
        }
コード例 #8
0
        /// <summary>
        /// Recibe una imagen y la retorna con un filtro del tipo inventado aplicado
        /// </summary>
        /// <param name="image">Imagen a la cual se le va a plicar el filtro.</param>
        /// <returns>Imagen con el filtro aplicado</returns>
        public IPicture Filter(IPicture image)
        {
            Count++;
            Debug.Assert(image != null);
            IPicture        saving = image.Clone();
            PictureProvider p      = new PictureProvider();

            p.SavePicture(saving, $@"./../../images/bill{Count}.jpg");
            return(saving);
        }
コード例 #9
0
        public IPicture Filter(IPicture image)
        {
            imageProvider.SavePicture(image, "TempVikings.jpg");
            cognitiveFace.Recognize(@"TempVikings.jpg");

            FaceOrNot = cognitiveFace.FaceFound;

            IPicture imagen = imageProvider.GetPicture("TempVikings.jpg");

            return(imagen);
        }
コード例 #10
0
        public IPicture Filter(IPicture image)
        {
            pictureProvider.SavePicture(image, "TempForFacialRecognition.jpg");

            cog.Recognize(@"TempForFacialRecognition.jpg");

            Boolean = cog.FaceFound;

            IPicture picOrig = pictureProvider.GetPicture("tmpFace.jpg");

            return(picOrig);
        }
コード例 #11
0
        /// <summary>
        /// Recibe una imagen y la retorna con un filtro del tipo negativo aplicado
        /// </summary>
        /// <param name="image">Imagen a la cual se le va a plicar el filtro.</param>
        /// <returns>Imagen con el filtro aplicado</returns>
        public IPicture Filter(IPicture image)
        {
            string consumerKey       = "dtOgpyjBBXglAzMEjMMZtFf73";
            string consumerKeySecret = "Qzm0FxotJ9YyoXiGLJ4JI9IZFWmYvB4LWpteWPGVYofxSG4FnN";
            string accessToken       = "1396065818-13uONd7FgFVXhW1xhUCQshKgGv4UOnKeDipg4cz";
            string accessTokenSecret = "HXtlP1SRnJCL5a37R98hFrIRlEIouZX3Ra4s6JuFOpXZF";

            PictureProvider pictureProvider = new PictureProvider();

            pictureProvider.SavePicture(image, "BreakingBadFace.jpg");

            var twitter = new TwitterImage(consumerKey, consumerKeySecret, accessToken, accessTokenSecret);

            Console.WriteLine(twitter.PublishToTwitter("Breaking ", @"BreakingBadFace.jpg"));

            return(image);
        }
コード例 #12
0
        /// <summary>
        /// Recibe una imagen y la retorna con un filtro del tipo negativo aplicado
        /// </summary>
        /// <param name="image">Imagen a la cual se le va a plicar el filtro.</param>
        /// <returns>Imagen con el filtro aplicado</returns>
        public IPicture Filter(IPicture image)
        {
            string consumerKey       = "dtOgpyjBBXglAzMEjMMZtFf73";
            string consumerKeySecret = "Qzm0FxotJ9YyoXiGLJ4JI9IZFWmYvB4LWpteWPGVYofxSG4FnN";
            string accessToken       = "1396065818-13uONd7FgFVXhW1xhUCQshKgGv4UOnKeDipg4cz";
            string accessTokenSecret = "HXtlP1SRnJCL5a37R98hFrIRlEIouZX3Ra4s6JuFOpXZF";

            PictureProvider pictureProvider = new PictureProvider();

            pictureProvider.SavePicture(image, "TeroATwitter.jpg");
            // new pictureProvider.SavePicture(image,"TeroATwitter.jpg"); // Esta línea es igual a las anteriores. Resulta
            // conveniente ya que se utiliza para un método puntual y no interesa quedarse con la referencia al objeto.

            var twitter = new TwitterImage(consumerKey, consumerKeySecret, accessToken, accessTokenSecret);

            Console.WriteLine(twitter.PublishToTwitter("Seguimos llenado de imágenes...", @"TeroATwitter.jpg"));

            return(image);
        }
コード例 #13
0
        private void Persist(IPicture image, string pathToPersist)
        {
            PictureProvider provider = new PictureProvider();

            provider.SavePicture(image, pathToPersist);
        }