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 Classic Chat / Change the Camera device resolution

Author
Message
Masterware
4
Years of Service
User Offline
Joined: 10th Jan 2020
Location:
Posted: 24th Jan 2020 18:21
Hello guys.
Is there a specific command that keep me to change the resolution of captured photos .
In my code ...
if ShowImageCaptureScreen() = 1
//*** Wait until an image has been captured ***
while IsCapturingImage() = 1
Sync()
endwhile
//*** Get ID assigned to selected image ***
id = GetCapturedImage()
if id <> 0
//*** Display image in a sprite ***
SetSpriteImage(1,id)
// SetSpriteSize(1,100,-1)
endif
endif


i'm able to acquire photos but the quality is low!

Thanks in advance for any kind of help .

Mauro
Masterware
4
Years of Service
User Offline
Joined: 10th Jan 2020
Location:
Posted: 24th Jan 2020 18:25
Hello guys.
is there some command that keep me to increase or decrease the photo quality after GetCapturedImage() from device ??
Masterware
4
Years of Service
User Offline
Joined: 10th Jan 2020
Location:
Posted: 29th Jan 2020 22:18
Wow!
Is it live this forum or the problem or my questions are so obvious??

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Jan 2020 22:42
What are your SetWindowSize() values?
What are your SetVirtualResolution() values?
Masterware
4
Years of Service
User Offline
Joined: 10th Jan 2020
Location:
Posted: 30th Jan 2020 11:41
hello blink0k.
many thanks for reply.
looking your requests i tried to change

SetWindowSize() & SetVirtualResolution()

as follow:

SetWindowSize( 3264,2448,0)
SetVirtualResolution( 1024,768 )


and

SetWindowSize( 1024,768,0)
SetVirtualResolution( 3264,2448 )


but the photo acquired was exactly the same (low quality).
If can help i used to test the software
AGK player on Samsung galaxy tablet posterior camera 8 mpx

the code used to handle image acquiring is :

SetSpriteVisible(1,0)
if ShowImageCaptureScreen() = 1
//*** Wait until an image has been captured ***
while IsCapturingImage() = 1
Sync()
endwhile
//*** Get ID assigned to selected image ***
id = GetCapturedImage()
if id <> 0
//*** Display image in a sprite ***

SetSpriteImage(1,id)
// SetSpriteSize(1,100,-1)
endif
endif


any kind of help is very appreciated.

Mauro
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Jan 2020 18:28 Edited at: 30th Jan 2020 18:29
i wish i had more time to play with this because i want to offer a proper response, but:
Quote: "ShowImageCaptureScreen
Description

This function has been deprecated, use SetDeviceCameraToImage instead."

a quick test shows that the command still works and does offer the built in On Screen Controls that i can't get to show using SetDeviceCameraToImage to change the camera resolution within the app.

regardless, the image that is getting captured, for me, has the same dimensions that are set within my phone's camera settings. but, the sprite size is set to whatever virtual resolution is.



so, i don't think the image is the "low resolution" problem where the sprite can be manually resized to match the image dimensions (i'm not sure where you're determining "low resolution" results, tho).

and, i'm out of time, for now. i hope the above leads you somewhere better
Masterware
4
Years of Service
User Offline
Joined: 10th Jan 2020
Location:
Posted: 1st Feb 2020 06:54
Hello Virtual Nomad.
Your comment is very precious and it's for me a very good starting point.
I thank you very for reply.
let me investigate more deeply . Later i will publish my progresses.

many thanks again.

Mauro

Login to post a reply

Server time is: 2024-11-22 11:48:33
Your offset time is: 2024-11-22 11:48:33