I have an application that takes a picture from the camera and then I do some image processing operations on that picture. But that's taking too long, so I want to decrease the size of the bitmap before the image processing operations. The important part is that resolution must be good in the smaller image also. Is there a library in android or is there anybody who knows an algorithm for that operation?
One method is to take the average of every n*n block and convert it to a single pixel. It isn't the absolutely sharpest method and won't be completely free of artifacts, but I think you'll find the real-world results to be acceptable - and it's very fast.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With