cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Purman
Helper I
Helper I

Why Camera control takes faulty pictures to collection?

I try to take picture with a button with the following OnSelect function: Collect(MyPictures, {Filename: Text(Now(),"[$-en-US]yyyy-mm-dd--hh-mm-ss") & ".jpg", Picture: Camera1.Photo})

 

The result is the following:

Capture.JPG

 

How can I fix it?

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

The problem is you are trying to take the picture with a button.  The camera control can only take a picture when you click on the camera control.  Its not designed to support invoking the camera from a button.  So you are getting a picture but its an empty one.  Put the same code in the OnSelect for the Camera control.  Then click on the Camera control and you'll see that it works.

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
yashag2255
Dual Super User II
Dual Super User II

@Purman 

 

Can you please confirm that you have enabled camera permissions in your browser? If yes, please try to logout of the browser, clear cache and re login to verify if the issue still exist, sometimes this happens because of caching issues.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thank you @yashag2255 !

 

Yes. the camera was enabled, and the issue is the same on my phone, can't display the images taken.

I tried to relogin, but the issue is the same.

yashag2255
Dual Super User II
Dual Super User II

@Purman 

 

I did a little digging and you are not able to see any images in your collection, because there is no image reference exist in Camera1.Photo 
 
To click a picture, user needs to click on the camera control and then the image reference is set, until them Camera1.Photo is a blank reference.
 
You can use below settings if you want to click the picture on go:
 
Camera Control:
Stream Rate: 100
Collection -> Collect(MyPictures, {Filename: Text(Now(),"[$-en-US]yyyy-mm-dd--hh-mm-ss") & ".jpg", Picture: Camera1.Stream})
 
Hope this Helps!
Pstork1
Dual Super User III
Dual Super User III

The problem is you are trying to take the picture with a button.  The camera control can only take a picture when you click on the camera control.  Its not designed to support invoking the camera from a button.  So you are getting a picture but its an empty one.  Put the same code in the OnSelect for the Camera control.  Then click on the Camera control and you'll see that it works.

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,783)