Invisible camera control
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
Invisible camera control
When I create a camera control with "cameraControlCreate" it works perfectly in iOS
but when I do the same on my Android phone, the preview does not appear.
I can take a photo, which confirm the function itself is present, but it is not visual.
This is the first time I try to use. "cameraControlCreate" I have previously used
mobilePickPhoto to capture pictures with the phone, so I do not know what to expect.
What could be wrong?
///Peter
but when I do the same on my Android phone, the preview does not appear.
I can take a photo, which confirm the function itself is present, but it is not visual.
This is the first time I try to use. "cameraControlCreate" I have previously used
mobilePickPhoto to capture pictures with the phone, so I do not know what to expect.
What could be wrong?
///Peter
/*Whats all the fuss with c# ?*/
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: Invisible camera control
I haven't used cameraControlCreate before either but after seeing your post I thought I'd take a look. I can't get it to work correctly on either my iPhone or my Android. Would you please share your code? What LC version are you sunning?
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
Re: Invisible camera control
I am running Lc Business edition 9.0.0 (dp11)
on openCard
if the environment is "mobile"
then
get the rect of image "rect"
cameraControlCreate "mobCam"
cameraControlSet "mobCam", "visible", true
cameraControlSet "mobCam", "rect", it
cameraControlSet "mobCam", "device", "back"
end if
end openCard
##### For some reason, the control does not appear (on iOS) before I run this button script #####
on mouseUp pButtonNumber
put cameraControlGet ("mobCam", "visible") into tStatus
if tStatus is true
then
cameraControlDo "mobCam", "takePicture"
cameraControlSet "mobCam", "visible", false
put the result into image "rect"
set the text of image "rect2" to the text of image "rect"
set the angle of image "rect2" to 270
else
put "" into image "rect"
put "" into image "rect2"
cameraControlSet "mobCam", "visible", true
end if
end mouseUp
///Peter
on openCard
if the environment is "mobile"
then
get the rect of image "rect"
cameraControlCreate "mobCam"
cameraControlSet "mobCam", "visible", true
cameraControlSet "mobCam", "rect", it
cameraControlSet "mobCam", "device", "back"
end if
end openCard
##### For some reason, the control does not appear (on iOS) before I run this button script #####
on mouseUp pButtonNumber
put cameraControlGet ("mobCam", "visible") into tStatus
if tStatus is true
then
cameraControlDo "mobCam", "takePicture"
cameraControlSet "mobCam", "visible", false
put the result into image "rect"
set the text of image "rect2" to the text of image "rect"
set the angle of image "rect2" to 270
else
put "" into image "rect"
put "" into image "rect2"
cameraControlSet "mobCam", "visible", true
end if
end mouseUp
///Peter
/*Whats all the fuss with c# ?*/
Re: Invisible camera control
Hi Guys
I am wondering if there is a way to lower the camera resolution on iOS using LC script.
Busy tinkering with an app that takes photos of till slips and saves it on remote server.
I do not need high res photos.
Thanks
Peter G
I am wondering if there is a way to lower the camera resolution on iOS using LC script.
Busy tinkering with an app that takes photos of till slips and saves it on remote server.
I do not need high res photos.
Thanks
Peter G
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
Re: Invisible camera control
Hi Peter G,
create an image "imageholder"
set the size to 375 x 670, or whatever size you want
set the position of it to -2000, -2000
lock the size and position of it
and then you just...
set the text of image "imageholder" to the text of the last image of this card
export image "imageholder" to imageToUpload as jpeg
delete the last image of this card
///Peter
create an image "imageholder"
set the size to 375 x 670, or whatever size you want
set the position of it to -2000, -2000
lock the size and position of it
and then you just...
set the text of image "imageholder" to the text of the last image of this card
export image "imageholder" to imageToUpload as jpeg
delete the last image of this card
///Peter
/*Whats all the fuss with c# ?*/
Re: Invisible camera control
Hi Peter
Thank yiu for your pointer
Much appreciated
Best
Peter
Thank yiu for your pointer
Much appreciated
Best
Peter