Hi Puneeth,
This problem can be reproduced if you change the dimensions of the array to CONGRID by rotating the dimension which represents RGB (i.e. 3). Initially, you are trying to make a [3, 70000, 7000] array into a [700, 700, 3] array and that is what is causing a problem. If you want your result to be [700, 700, 3] then I would do that after the call to CONGRID. Here is an example of how to properly shrink your image to avoid any problems:
; Select the file.
file = FILEPATH('rose.jpg', SUBDIR=['examples', 'data'])
read_jpeg, file, data
; Use the CONGRID function to increase the image array
magnifiedIm = CONGRID(data, 3, 10000, 10000, /INTERP)
im1 = IMAGE(magnifiedIm)
;result is bad if you changge the x, y, z order of the image
shrunkIm = CONGRID(magnifiedIm, 100, 100, 3)
im2 = IMAGE(shrunkIm)
;proper way to shrink image
shrunkIm = CONGRID(magnifiedIm, 3, 100, 100)
im3 = IMAGE(shrunkIm)
|