Ren'py help needed- image cropping/sizing

bcsjkdfjksh

Newbie
Mar 22, 2019
66
22
Hey everyone,recently started using ren'py and have come across a problem. My image files 1920x1080 seem to be cropping each time, they do not display the full image. Here is my code:

image pic1 = im.Scale("1.png", 1920, 1080)
image pic2 = im.Scale("2.png", 1920, 1080)



Any ways to fix this so the full image can be displayed?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,959
16,194
Hey everyone,recently started using ren'py and have come across a problem. My image files 1920x1080 seem to be cropping each time, they do not display the full image. Here is my code:

image pic1 = im.Scale("1.png", 1920, 1080)
image pic2 = im.Scale("2.png", 1920, 1080)


Any ways to fix this so the full image can be displayed?
Alright...
Open the "guy.rpy" file. Then change the gui.init(1280, 980) that should be at line 12, into gui.init(1920,1080).
And next time you create a new project from the SDK, when asked the size of the game, give the right one, it will help.


Oh, you can also drop the im.Scale, Ren'py know the size of your images, you don't need to enforce it.
 
  • Like
Reactions: Rich

maverick555

Newbie
Dec 10, 2019
54
16
My images have a resolution of 2560x1440p and they are also getting cropped.


I changed the gui.init and then it got solved but the main menu also became smaller.
Can anyone please help
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,378
My images have a resolution of 2560x1440p and they are also getting cropped.


I changed the gui.init and then it got solved but the main menu also became smaller.
Can anyone please help
Well, when you told Ren'py that your game should be 2560x1440, it's going to scale everything on the assumption that's the "normal" size. When you say "main menu also became smaller," are you referring to the text? If your monitor doesn't display 2560x1440, then Ren'py is going to scale everything down. In other words, if you tell Ren'py the game is 2560x1440, but your monitor only displays 1280x720, then Ren'py is going to halve the size of everything in order to make it fit your monitor. So, if you told Ren'py the menu font was supposed to be 36, it's now going to display at 18.
 
  • Like
Reactions: maverick555

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,959
16,194
If your monitor doesn't display 2560x1440, then Ren'py is going to scale everything down.
It's a different issue.

When you create a new project, Ren'py define some of the gui variables according to the size you told it to use for the screen ; by example gui.dialogue_width. Some of those variables are used by the main menu, and like their values are computed for a smaller screen, the menu become smaller.

The easiest way to solve this is probably to create a new project, this time with the correct size, then move its "gui.rpy" file in the game project.
 
  • Like
Reactions: maverick555

maverick555

Newbie
Dec 10, 2019
54
16
It's a different issue.

When you create a new project, Ren'py define some of the gui variables according to the size you told it to use for the screen ; by example gui.dialogue_width. Some of those variables are used by the main menu, and like their values are computed for a smaller screen, the menu become smaller.

The easiest way to solve this is probably to create a new project, this time with the correct size, then move its "gui.rpy" file in the game project.
Created a new project and now all is cool. thank you guys!