new Bitmap() vs bitmap.resize

I'm having trouble understanding the bitmap.resize method, shouldn't 
 

this.a.bitmap = new Bitmap(width, height);this.a.bitmap.gradientFillRect(0, 0, width, height, color1, color2); and,
 

this.a.bitmap.clear()this.a.bitmap.resize(width, height);this.a.bitmap.gradientFillRect(0, 0, width, height, color1, color2);do the same thing?
cus it doesn't work, can someone explain me the difference and the why?
Thank you in advance
What happens when you try it?
What happens when you try it?
the second one doesn't work it's like the sprite doesn't get refreshed :/

the sprite moves so the refresh/update methods are being called but the bitmap doesn't resize..
I'm having trouble understanding the bitmap.resize method, shouldn't 

this.a.bitmap = new Bitmap(width, height);this.a.bitmap.gradientFillRect(0, 0, width, height, color1, color2); and,

this.a.bitmap.clear()this.a.bitmap.resize(width, height);this.a.bitmap.gradientFillRect(0, 0, width, height, color1, color2);do the same thing?

cus it doesn't work, can someone explain me the difference and the why?

Thank you in advance

resizing a bit map will resize an exhausting bitmap where as a new one will create a new bitmap. Thats the core difference.

Original thread: https://forums.rpgmakerweb.com/threads/new-bitmap-vs-bitmap-resize.52293/