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 / Low resolution on Phone Camera

Author
Message
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 30th Sep 2020 00:23
I use this to capture an image from my Android phone:



However, the resulting image is 150 x 170 pixels... How can I adjust this?

(Yes, I know it's depricated, but I need to use all my phones camera options like zoom etc.)
Dutch
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 30th Sep 2020 02:11
Increase your SetVirtualResolution() values
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 2nd Oct 2020 19:24
Those are at 1000x1500...
Dutch
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 1st Nov 2020 00:19
Any more clues why the captured image size is absolutely tiny with ShowImageCaptureScreen()?
Dutch
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Nov 2020 01:58
I don't think it's about the resolution of the image it's just the size of the sprite.
If you change the size of the sprite (or save it to your camera roll) you will see that the resolution is ok.
Note that the sizing is set for portrait. You will need to change the logic for landscape

Try this

marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 1st Nov 2020 22:17
My current code:

Dutch
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Nov 2020 23:01
Does it work?
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 2nd Nov 2020 19:05
No, still low res. Have you checked on your own phone?
Dutch
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Nov 2020 20:20 Edited at: 2nd Nov 2020 20:21
Works perfectly. Same resolution as my phone 1920x2560
How do you determine the resolution?
What is your window size?
What is your virtual resolution?
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 7th Nov 2020 11:38 Edited at: 7th Nov 2020 11:58
Quote: "However, the resulting image is 150 x 170 pixels... How can I adjust this?"


It's either due to how the sprite was created that you are saving to or due to how you are saving the image.

I'd perhaps try to experiment with the GetImage() command instead and explicitly set the screen resolution you wish to capture in full, whilst also saving to a sprite that already has the size you are looking for. Keep in mind you can't use Sync() with that, but have to use Update and Render() separately:

Login to post a reply

Server time is: 2024-03-29 12:36:52
Your offset time is: 2024-03-29 12:36:52