Flip Image in Processing 3.4 [duplicate]












2















This question already has an answer here:




  • Processing mirror image over x axis?

    1 answer




How can I flip (mirror) an image along the Y-axis in Processing 3.4? I have tried scale(-1,1) but that just makes my image disappear.










share|improve this question















marked as duplicate by George Profenza, Community Dec 7 at 1:53


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.




















    2















    This question already has an answer here:




    • Processing mirror image over x axis?

      1 answer




    How can I flip (mirror) an image along the Y-axis in Processing 3.4? I have tried scale(-1,1) but that just makes my image disappear.










    share|improve this question















    marked as duplicate by George Profenza, Community Dec 7 at 1:53


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















      2












      2








      2








      This question already has an answer here:




      • Processing mirror image over x axis?

        1 answer




      How can I flip (mirror) an image along the Y-axis in Processing 3.4? I have tried scale(-1,1) but that just makes my image disappear.










      share|improve this question
















      This question already has an answer here:




      • Processing mirror image over x axis?

        1 answer




      How can I flip (mirror) an image along the Y-axis in Processing 3.4? I have tried scale(-1,1) but that just makes my image disappear.





      This question already has an answer here:




      • Processing mirror image over x axis?

        1 answer








      processing






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 21 at 3:11









      Kevin Workman

      33.3k53969




      33.3k53969










      asked Nov 21 at 2:49









      Jamil Mahmoudian

      133




      133




      marked as duplicate by George Profenza, Community Dec 7 at 1:53


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






      marked as duplicate by George Profenza, Community Dec 7 at 1:53


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


























          1 Answer
          1






          active

          oldest

          votes


















          1














          If you call scale(-1, 1) then your X values are flipped, and you have to adjust your arguments accordingly. Here's an example:



          size(500, 500);
          PImage img = loadImage("my_image.jpg");
          scale(-1, 1);
          image(img, -500, 0, width, height);


          Personally I find this very confusing, so I would avoid calling scale() with negative numbers. There are a number of ways to flip an image: I would probably use the get() function to get the colors from the image and copy them into a PGraphics instance.






          share|improve this answer




























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            If you call scale(-1, 1) then your X values are flipped, and you have to adjust your arguments accordingly. Here's an example:



            size(500, 500);
            PImage img = loadImage("my_image.jpg");
            scale(-1, 1);
            image(img, -500, 0, width, height);


            Personally I find this very confusing, so I would avoid calling scale() with negative numbers. There are a number of ways to flip an image: I would probably use the get() function to get the colors from the image and copy them into a PGraphics instance.






            share|improve this answer


























              1














              If you call scale(-1, 1) then your X values are flipped, and you have to adjust your arguments accordingly. Here's an example:



              size(500, 500);
              PImage img = loadImage("my_image.jpg");
              scale(-1, 1);
              image(img, -500, 0, width, height);


              Personally I find this very confusing, so I would avoid calling scale() with negative numbers. There are a number of ways to flip an image: I would probably use the get() function to get the colors from the image and copy them into a PGraphics instance.






              share|improve this answer
























                1












                1








                1






                If you call scale(-1, 1) then your X values are flipped, and you have to adjust your arguments accordingly. Here's an example:



                size(500, 500);
                PImage img = loadImage("my_image.jpg");
                scale(-1, 1);
                image(img, -500, 0, width, height);


                Personally I find this very confusing, so I would avoid calling scale() with negative numbers. There are a number of ways to flip an image: I would probably use the get() function to get the colors from the image and copy them into a PGraphics instance.






                share|improve this answer












                If you call scale(-1, 1) then your X values are flipped, and you have to adjust your arguments accordingly. Here's an example:



                size(500, 500);
                PImage img = loadImage("my_image.jpg");
                scale(-1, 1);
                image(img, -500, 0, width, height);


                Personally I find this very confusing, so I would avoid calling scale() with negative numbers. There are a number of ways to flip an image: I would probably use the get() function to get the colors from the image and copy them into a PGraphics instance.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 21 at 3:10









                Kevin Workman

                33.3k53969




                33.3k53969















                    Popular posts from this blog

                    404 Error Contact Form 7 ajax form submitting

                    How to know if a Active Directory user can login interactively

                    TypeError: fit_transform() missing 1 required positional argument: 'X'