Android App Development for Beginners – 59 – Inverting an Image

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

23 responses to “Android App Development for Beginners – 59 – Inverting an Image”

  1. Duendão Maravilha Avatar

    ALMOST THERE BITCHES!

  2. J Dub Avatar

    This image effect is actually called "inverse," not "invert." Invert means to flip the image upside down.

  3. ss Avatar

    I am sure there is a quicker way of doing this rather than traversing through every single pixel, right?

  4. ss Avatar

    8:18 dude what the fuck?

  5. a.gon Avatar

    It worked!!!

  6. Diewe Ooms Avatar

    how to make a perfectly fine tutorial pure trash with 1 single disgusting burb

  7. nanashimara Avatar

    getResources().getDrawable(int id) can be replaced with getDrawable(int id).

  8. KyBaCorps Avatar

    the lady is real pretty

  9. Karthik Bhargav Avatar

    These tutorials can be much more precise and clear. The simple apps developed here doesn't give any feel like we are developing an application.

  10. Dre eam Avatar

    It's been a few tutorials since there was no typos at all, Glad you're refreshed and back on track man. Besides for exposing your inner demon eyes this was a great tutorial 😀 can't wait for the next.

    https://twitter.com/tc2r1

  11. Miroslav Mrak Avatar

    Very good tutorial, as all others your's tutorials.

  12. Zeta Avatar

    8:30 "I said pixels instead of pixels"

  13. AJ213 Avatar

    So Only around 10,000 people made it through all of bucky's tutorials.
    I would say 90% of those people will attempt to make a app
    So that's 9,000 people now.
    I would say of that 9,000 people only half will actually get there and release their first app.
    Now we have 4,500.
    Of that 4,500 10% will actually be decent.
    Now we have 450.

    People if you put your time and effort you can be that 450 people. and possibly you can build the next big app. JUST DO IT!

  14. Shaun Avatar

    How do i make a button to toggle invert on a image?

  15. dhruva pandey Avatar

    If you stop passing boring pg would be gr8

  16. Aditya Joglekar Avatar

    I was trying to invert the image without looking at Bucky's code and took 'inverting the image' quite literally, I turned the bitmap pixel upside down instead of inverting the (A,R,B,G) value.

    Here's the code for my version of inversion method :

    public static Bitmap invertImage(Bitmap original)
        {
            //this is a blank bitmap which only knows what its height,width should be and how shold it
            //store the information about each pixel. e.g argb or rbg rtc.
          Bitmap finalImage= Bitmap.createBitmap(original.getWidth(),original.getHeight(),original.getConfig()) ;

         //    int A,R,G,B;
             int pixel;
            int height=original.getHeight();
            int width=original.getWidth();

            //loop through the entire bitmap of the picture.
            for(int y=0;y<height;y++)
            {
                for(int x=0;x<width;x++)
                {
                    pixel=original.getPixel(x,y); //this allowas us to get the pixel storing the information.

                 /*   A=Color.alpha(pixelColor);
                    R=255-Color.red(pixelColor);
                    G=255-Color.green(pixelColor);
                    B=255-Color.blue(pixelColor);*/

           //note that when width is say W and if the index starts from zero then  the range i values
           // for the variable looping through the the wifth is   0<var<width-1.
                    finalImage.setPixel(width-x-1,height-y-1,pixel); //the pixel is sent to the inverted position in the new Bitmap.
                }
            }
            return finalImage;
        }

  17. Shayne Dsouza Avatar

    I'm making a photo editing app where I use the camera to click a picture,
    convert it to bitmap, invert it and display
    But probably due to the resolution, it takes around 10 seconds to load
    the inverted image. How to tone down the resolution or can I get a 
    better solution?

  18. les paul Avatar

    Hey fellas do you know an easy way to get source codes? I go to forum but there are tons of pages and it's like pulling teeth if you are trying to find a specific source code. Maybe you know the way for searching which I couldn't discover. Sharing is caring. Please help me on this.

  19. Mohamed Hamed Avatar

    8:17 Oh man This is a pretty small Burp 😛 if you come to Egypt and eat from our popular meal (The Egyptian Beans "Foul") and drink a can of cola after that, you will Burp like a beast 😀

  20.  Avatar
    Anonymous

    8:18 DUDE I ALMOST PUKED

  21. Adem Dinarević Avatar

    Next tutorial please!

  22. Nawshad Hamid Avatar

    insert captured image to database and show it

  23. Justin As Avatar

    You should have made a black and white effect instead 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *