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 Chat / GetImage and wrong image size

Author
Message
wyrleywolves2
User Offline
Joined: 16th Jan 2018
Location:
Posted: 16th Jan 2018 20:28
clearscreen()
drawbox (rx,ry,rx2,ry+1,red,red,red,red,1)
Render()
GetImage(linecount,rx,ry,rx2,ry+1)

I am trying to draw a box of 100 width and 2 height and then grab the image. The grabbed image is being enlarged, is there a way to grab an image of 100x2?
BatVink
Moderator
15
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Jan 2018 21:44
GetImage uses the device resolution (because it gets the backbuffer). If your virtual resolution is different, you'll get a different image size.
Check the help files for the full explanation.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Bengismo
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 16th Jan 2018 22:04 Edited at: 16th Jan 2018 22:07
I think its that he is not passing the correct parameters... the second pair of variables is width and height.... not x2,y2

GetImage (imageID, x, y, width, height )

so you need GetImage(linecount,rx,ry,100,2) right??
wyrleywolves2
User Offline
Joined: 16th Jan 2018
Location:
Posted: 16th Jan 2018 23:37
Thanks for your replies, Yes I was passing wrong values, I thought it would be x,y,x2,y2, I read it several times but it didn't sink in for some reason.

Login to post a reply

Server time is: 2018-10-15 12:11:09
Your offset time is: 2018-10-15 12:11:09