correct rect for "cameracontrol"

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Klaus
Posts: 13782
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

correct rect for "cameracontrol"

Post by Klaus » Thu Apr 29, 2021 6:56 pm

Hi all,

we have this wonderful "cameracontrol" in LC. :-)

Is there a way to get the physical resolution of the
devices camera BEFORE we:

Code: Select all

cameracontrollset "el camera", tRect,...
Or at least its aspect ratio? Know what I mean?

We definitively need this info to be able to set up a correct
RECT for the control with no "cut off" sides.
Maybe I am just overlooking something?


Best

Klaus

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9244
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: correct rect for "cameracontrol"

Post by richmond62 » Thu Apr 29, 2021 8:00 pm

1. dunno what that double 'L' is doing there. :D

Reading THIS:
-
SShot 2021-04-29 at 21.47.53.png
-
I see 'rect' . . .

"rect": the bounds of the control, relative to the top-left of the card. For example "0,0,100,100"."

Mind you, this in INDY does nix:

Code: Select all

on openCard
   cameraControlCreate "RM"
   cameraControlSet "RM", "rect", (100, 100, 500, 300)
   cameraControlSet "RM", "visible", "true"
   cameraControlSet "RM", "device", "default"
end openCard

Klaus
Posts: 13782
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: correct rect for "cameracontrol"

Post by Klaus » Thu Apr 29, 2021 8:22 pm

richmond62 wrote:
Thu Apr 29, 2021 8:00 pm
1. dunno what that double 'L' is doing there. :D
Just teasing you! :D

You need a camera (a cheap-o webcam or whatever) attached to your computer to make the script work, of course.
But that was not my question!

Klaus
Posts: 13782
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: correct rect for "cameracontrol"

Post by Klaus » Fri Apr 30, 2021 3:49 pm

Solution from the mailing list. We can:

Code: Select all

...
put CameraControlGet(”myCamera”, ”qualityPresets”) into tList
...
which gives me on my Mac:
photo,high,medium,low,352x288,640x480,1280x720,320x240,960x540,iFrame960x540,iFrame1280x720
So I can "pull" out the desired dimensions.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”