Hi, everyone
I have to get the color values array from an input image and then increase or decrease the number of elements (pixel).
For example, If I have 2x2 color values and I have to change it to be 4x4 and then change array to image to represent a new image.
The size of array is from the input image size
In case of increasing, it will look like this,
2 4>>>>>>>>>> 2 2 4 4 >>>>>>> new image
6 8 2 2 4 4
6 6 8 8
6 6 8 8
But if I have to decrease array from 4x4 to 2x2 , I have to find and average of each array group
2 3 4 10 >>>>>>>> 2.5 7 >>>>>>> new image
3 2 10 4 5 8
6 4 8 8
4 6 8 8
My problem is I don't know how to do it. Now, I only get the color value array but I cannot increase or decrease to form a new array.
Please help, I am just the beginner.
Regard
Thank you in advance
P.S. Sorry for my poor English grammar.