I'm having problems with built in Java image interpolation methods and haven't had any success finding a way to create my own, or using a different existing one. Basically I'd like to interpolate using a peak-picking method, similar to nearest neighbor except that it will consider all neighbors and take the value that has the highest alpha value. The overall goal is to never throw away the highest value when scaling down. An example would be an image that is 2x4:
If I scaled the image down to 2x2 the resulting image would look like:
The values above represent the alpha values in each pixel. Not sure if this "peak picking" method has a mathematical name so I'm not sure what to search for. Any help would be greatly appreciated.