"Show Picture" Image Off-Center

I am pulling my hair out at this and cannot understand why it is not working.

I'm using the Show Picture event to fill the screen with a picture when the player checks a piece of paper. I am using Yanfly's Core Engine script and have the screen resolution set to 640x480. The picture I want shown is also 640x480.

In the Show Picture event, I have the Origin set to Upper Left and the X,Y coordinates at 0,0. Haven't touched any other options.

The image is being pushed down and right a little, enough that it is obviously not centered onscreen. See below:



What's really driving me nuts about this is that I have pictures elsewhere in the game (also 640x480 images) that are perfectly centered when triggered by the player. What I want to know is, why not this one? Anyone have any ideas?
try the autocentering by setting the Origin to center and the display coordinates to 320,240.


If your data i scorrect, then your picture should have been centered - but when you're using the upper left to place pictures, any mistake in calculating picture size can result in off positioning, with the center option and the halfscreen-coordinates the picture is automatically centered. If that is not centered, then either you're wrong with the picture size (export it again to make sure) or something changed the default scripts for picture positioning...
Andar, thank you so much for the quick reply.

I double-checked everything about the image size and everything was correct. HOWEVER...I solved my problem. It had nothing to do with the size of the picture, but the size of the map it was being shown on. See, the room in which you would find the picture is very small, so the map size was set to the default minimum (17x13). For whatever reason, this pushed the picture off center. I solved this by increasing the map size to 20x15. Now the picture displays perfectly. Should have realized with the increase in resolution to 640x480 that I needed to adjust the map size as well.

In any case, thank you for mentioning the "default script" as this is what triggered the solution in my slow, slow brain.
Pictures are shown via screen coordinates, so yeah, editing the window size (resolution) would affect how you show things
Is your map 20x15 tiles or smaller? Make sure it's big enough to actually fill the 640x480 window.
Hi Shaz,

Yes, I discovered that that was the problem. I have since resized the map and now the picture is properly centered. Thanks! It was driving me absolutely insane.
That script does something funny to move the whole map around, if your map is not big enough to fit the window. It gave me a lot of headaches with my mouse script. I sure hope everyone using it is using it for other reasons than just resizing the screen.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/show-picture-image-off-center.23828/