I'm supposed to resize an image given to me by half using arrays. I have no idea where to begin. I'm given a function
public static int[][] resizeImage(int[][] original, int newWd, int newHt)
and I'm supposed to use 2d arrays to map pixels from original to new image. Not sure if I'm giving enough info. I don't want the answer, just a hint or starting point, because I'm just not sure how to even start with this.
Ok, assuming a 100x100 image, if you had a blue pixel at [0,0] and a red pixel at [99][99], after the resizing where would you expect these pixels to be?
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