• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Is it possible to take a snapshot with the camera on device and use it as sprite?

Tornado

Member
I searched the forum but couln't find such info.

So is that possible?
For example one usage could be that user makes a snapshop of his face, then he can define some crop area, when he is done I take that cropped image and use it as image next to his name where his score is shown.
 
C

Comedy Rotten

Guest
You may be able to do this with importing an image, but as for getting an image from a camera, that may be more difficult. There are a couple Android and iOS camera DLLs over in the marketplace, but I have not seen anything in the way of web cameras for getting a picture from them directly. I may be wrong here, and there probably is, but it beyond the scope of my knowledge.
 

Tornado

Member
ok, it means there is no abstraction for this in GMS, but for every platform (Android, iOS) I have to do it separately with separate extensions or DLLs or whatever.
Is that correct?

@Comedy Rotten: putting the camera aside, you said "you may be able to do this with importing an image". From where I can import images in GMS?
I think I read here in the forum that you can't access any folders on the mobile device. So I guess the user also cannot upload his photo from his phone galery into GM game? If this would be possible I could live with that!
Also I read that it is possible to download an image from a website via http functionality.
Which approach did you have on your mind?

Thx for all answers!
 
C

Comedy Rotten

Guest
@Tornado After digging around, it looks like the method I was thinking of (sprite_add) appears to only work on Windows (and maybe Mac/Linux, though not very easily from what I gather). For Android and iOS, you may be stuck using DLLs as Lonewolf mentioned. The sandboxing of Game Maker games is a good feature, but one that makes certain tasks much more difficult; such is the conundrum of balancing security with usability.
 
P

PlayLight

Guest
I searched the forum but couln't find such info.

So is that possible?
For example one usage could be that user makes a snapshop of his face, then he can define some crop area, when he is done I take that cropped image and use it as image next to his name where his score is shown.
Absolutely. I've use the exact same feature in a few of my application.
iOS Camera by Beneton Software
Android Camera by Cotarlea Paul
can both retrieve from front and/or back cameras and incl additional image prepping functions.
You can then use basic gml to construct a cropping ui for user interaction and save out the final result.
 
Absolutely. I've use the exact same feature in a few of my application.
iOS Camera by Beneton Software
Android Camera by Cotarlea Paul
can both retrieve from front and/or back cameras and incl additional image prepping functions.
You can then use basic gml to construct a cropping ui for user interaction and save out the final result.
Hi,
I'm looking to work on a project but it requires using the front camera of a mobile phone.
I have looked at the links that have been posted in the quote above but it just says I don't have access to that.
Is there something out there to do this or am I missing something?

Thanks in advance
 
Top