Adjust picture size to screen size

I was looking for some plugin or option that could help me adjusting the size of any picture to the same size of my game screen. But I could not find anything.

So I made it myself. I hope this can help someone. If you have any corrections to my code please comment. Thank you

//============================================================================= // RPG Maker MZ - Button Picture //============================================================================= /*: * @target MZ * @plugindesc Adjust pictures size in full screen. * @author geskechan * * @help FullScreenPicture.js * */ (() => { const _Game_Picture_show = Game_Picture.prototype.show; Game_Picture.prototype.show = function() { _Game_Picture_show.apply(this, arguments); let bitmap = ImageManager.loadPicture(this._name); let image = bitmap._image; let adjustedScaleX = (Graphics.width / image.naturalWidth) * 100; let adjustedScaleY = (Graphics.height / image.naturalHeight) * 100; this._scaleX = adjustedScaleX; this._scaleY = adjustedScaleY; }; const _Game_Picture_move = Game_Picture.prototype.move; Game_Picture.prototype.move = function() { _Game_Picture_move.apply(this, arguments); let bitmap = ImageManager.loadPicture(this._name); let image = bitmap._image; let adjustedScaleX = (Graphics.width / image.naturalWidth) * 100; let adjustedScaleY = (Graphics.height / image.naturalHeight) * 100; this._targetScaleX = adjustedScaleX; this._targetScaleY = adjustedScaleY; }; })();
even if it's a nice idea, there are 2 issues.

if they want to show a picture smaller instead of bigger.
as some uses screensize resolution to show the image as that
automatically scales it.

if you use smaller images and scale up, it might blur a bit, if you
need it constant full screen, it might be a nice idea to do so, otherwise
you need something to adjust them in way for all sizes and not persistent.

Original thread: https://forums.rpgmakerweb.com/threads/adjust-picture-size-to-screen-size.152247/