I am making an Android app right now, and part of this app is performing analysis on a photo. The current implementation uses ColorUtils.colorToLAB to retrieve the color at a specific pixel, like this:
The issue is that this code is taking forever to run. Somewhat to be expected because it's iterating over thousands of pixels, but I'd like to reduce the time taken by this code as much as possible. I've benchmarked it and found that this part of the code is taking ~90% of the time for the procedure. I'm wondering if there is any way that is known to improve the performance, or an alternative for how to get the pixel of a color in an android.graphics.Bitmap that performs better.