Yes if you do down scale, function will reduce number of pixels and work out colour for each remaining pixel. Where if you scale up (enlarge) it will just spread the colour difference from pixel one to pixel two on the extra pixel received from enlragment
but when i tried to downscale an image and when i use .getHeight() and getWidth() on the modified image
it shows the older values.
that is i uses 800x800 image