Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Struggling with rendertoimage (bug?)

Author
Message
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 23rd Aug 2020 10:19
I have a windowed program with a virtual size of 1920x1080



Exporting from here with rendertoimage works fine



However, when I full size the app it gets resized to fit the screen (which is okay and logical) and shows some black sides



but if I export the image, it ALSO gets those sideborders!





Any idea what goes wrong? I'm really struggling with this part of AGK...


Dutch

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Aug 2020 21:53 Edited at: 24th Aug 2020 04:32
Maybe try (Note that copyimage is a very slow function and should no be used every frame)

marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 25th Aug 2020 10:09
Thanks, but sorry, that just saves a smaller image (1920 x 1057), whilst I need the full resolution as set in virtual.
Dutch
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Aug 2020 10:35
Does the image have the borders?
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 25th Aug 2020 11:18
No, it doesn't.
Dutch
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 25th Aug 2020 15:43 Edited at: 25th Aug 2020 15:51
Shouldn't you guys be commenting the comments? ie... // to draw all sprites in their position

Even if you guys know it should be there. newcomers reading this thread might not know.

Although, I am still using Classic, so maybe Studio has some new feature to ignore non compliant code as comments or something, so disregard this concern if that is so.

If not, then it seems you should get a compile error when forgetting to comment the comments, right? (or am I brain farting and that is not a comment?)

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 26th Aug 2020 04:47 Edited at: 26th Aug 2020 04:48
Quote: "Shouldn't you guys be commenting the comments? ie... // to draw all sprites in their position"


I may have interpreted that incorrectly but i think it was just a form of psuedo-code. An abbreviation of what might be a lot of commands

If it doesn't contain borders then maybe you could resize it using ResizeImage( imageID, width, height ). I'm thinking it wont distort because of the window size/resolution ratio
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 1st Sep 2020 12:44
It was indeed used to represent a lot of code that works fine and should not have any influence on the drawing of borders. Resize would still lessen the quality of the export...
Dutch
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Sep 2020 22:33
Quote: "Resize would still lessen the quality of the export..."

I would try it and see. Internal resolution is a strange thing
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 3rd Sep 2020 07:31
your renderimage size needs to be changed if the window size is changed. each main loop it check for a screen size change if its detected set a new virtual resolution and or image size

Login to post a reply

Server time is: 2024-03-28 09:26:48
Your offset time is: 2024-03-28 09:26:48