locked
Store Camera or Pen Images for Later Retrieval? RRS feed

  • Question

  • Can a PowerApp store images from the camera or pen in an Excel file on OneDrive, a SharePoint list or some other data container for later retrieval? So far, I've been able to store pen and camera files as blob files and, of course, in a temporary collection that can be displayed in a gallery. I don't understand how to use blob files and more permanent storage is the goal. Is there another way to do this or is there an easy way to read back the blob files and convert them to images again?


    • Edited by ExCessna Tuesday, February 16, 2016 9:16 PM
    Tuesday, February 16, 2016 9:06 PM

Answers

  • Hi ExCessna,

    If you want to store image permanently, you can try to save the images into a SharePoint list. When you use the image in future, you can read the images from SharePoint to PowerApps.

    Thanks,

    Wendy


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, February 23, 2016 7:45 AM
    Moderator
  • Hi

    It definitely works. I had tried before and tried again just now.

    The excel file:

    ./data_images/WIN12_Claudia_03.png
    ./data_images/WIN12_Asami_01.png
    ./data_images/WIN12_Justin_01.png
    ./data_images/WIN12_NuriaV_02.png

    Make sure you create a folder in the dropbox, with folder name: data_images (in this case) and the title of the table header for image is: image[image] (In fact, I asked PG before any guidelines as of Project Siena, Harold, how to Store Image, Video and Audio, but until NOW, no reply and I also requested to update into PowerApps Help File}.


    PK Hong

    I just found that a recent update in https://powerapps.microsoft.com/en-us/tutorials/control-add-picture/.

    Excellent update from PG.  I am sure this is the ANSWER to your and MY questions, too.

    Bravo!


    PK Hong

    • Proposed as answer by PK Hong Friday, March 18, 2016 6:28 AM
    • Unproposed as answer by ExCessna Friday, March 18, 2016 5:36 PM
    • Marked as answer by ExCessna Friday, March 18, 2016 6:50 PM
    Friday, March 18, 2016 6:28 AM

All replies

  • Hi ExCessna,

    If you want to store image permanently, you can try to save the images into a SharePoint list. When you use the image in future, you can read the images from SharePoint to PowerApps.

    Thanks,

    Wendy


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, February 23, 2016 7:45 AM
    Moderator
  • Hi Wendy,

    I'm trying to capture both the images and associated text data into the same SharePoint list or library. Is this possible, or do the images have to be stored in a SharePoint Picture Library and the text in a separate list, using a unique number in each to associate the two when read back?

    Thank you!

    ExCessna


    • Edited by ExCessna Wednesday, March 16, 2016 3:25 PM Correction and clarification
    Wednesday, March 16, 2016 3:23 PM
  • Hi ExCessna,

    You can save the images and associated text data into a same SharePoint list or library. It is OK.

    Thanks,

    Wendy


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, March 17, 2016 2:17 AM
    Moderator
  • Will there be ways to save to OneDrive in the near future?
    Thursday, March 17, 2016 7:03 AM
  • Hi

    In one of the Template (Start from a Template) - Contacts, it shows examples on taking photo of the person and save into a image folder (in Dropbox).


    PK Hong

    • Proposed as answer by PK Hong Thursday, March 17, 2016 10:22 AM
    Thursday, March 17, 2016 10:22 AM
  • Hi Wendy, Brian and PK,

    I will attempt to clarify my goal and the direction I’ve been taking to accomplish it:

    The app uses the camera to take a picture and draw to capture a signature. I have been able to read and write text and the camera (photo) and draw (image) data to an Excel file on personal OneDrive. The photos and images can be viewed only temporarily, while the app is running. They appear as BLOB files when retrieved from the saved Excel file.

    Goal: To store images and associated text permanently in the more secure and robust SharePoint Office 365 cloud and be able to retrieve them as images (not BLOBs).

    Using a SharePoint list works fine if only text fields are included in the Patch function. But, for example, including the item “SDrawing:Drawing.image” results in the error “The function Patch has some invalid arguments. The specified column ‘SDrawing’ does not exist.” On SharePoint, the column "SDrawing" is set as Hyperlink or Picture with the "Format URL" set to Picture. The same thing happens if using a Picture Library. Similar errors result if a “SinglePicture:Mugshot.photo” item is included in the Patch. How do I make this work or am I completely on the wrong track? Is my limited SharePoint knowledge the problem?

    Your help is very much appreciated.

    ExCessna


    • Edited by ExCessna Saturday, March 19, 2016 5:15 PM correction
    Thursday, March 17, 2016 4:34 PM
  • PK,

    Thank you. I will give it a try. Maybe the answer lies in the template.

    Appreciate your help,

    ExCessna

    Thursday, March 17, 2016 4:38 PM
  • Hi

    It definitely works. I had tried before and tried again just now.

    The excel file:

    ./data_images/WIN12_Claudia_03.png
    ./data_images/WIN12_Asami_01.png
    ./data_images/WIN12_Justin_01.png
    ./data_images/WIN12_NuriaV_02.png

    Make sure you create a folder in the dropbox, with folder name: data_images (in this case) and the title of the table header for image is: image[image] (In fact, I asked PG before any guidelines as of Project Siena, Harold, how to Store Image, Video and Audio, but until NOW, no reply and I also requested to update into PowerApps Help File}.


    PK Hong

    • Proposed as answer by PK Hong Thursday, March 17, 2016 6:04 PM
    Thursday, March 17, 2016 6:04 PM
  • Hi

    It definitely works. I had tried before and tried again just now.

    The excel file:

    ./data_images/WIN12_Claudia_03.png
    ./data_images/WIN12_Asami_01.png
    ./data_images/WIN12_Justin_01.png
    ./data_images/WIN12_NuriaV_02.png

    Make sure you create a folder in the dropbox, with folder name: data_images (in this case) and the title of the table header for image is: image[image] (In fact, I asked PG before any guidelines as of Project Siena, Harold, how to Store Image, Video and Audio, but until NOW, no reply and I also requested to update into PowerApps Help File}.


    PK Hong

    I just found that a recent update in https://powerapps.microsoft.com/en-us/tutorials/control-add-picture/.

    Excellent update from PG.  I am sure this is the ANSWER to your and MY questions, too.

    Bravo!


    PK Hong

    • Proposed as answer by PK Hong Friday, March 18, 2016 6:28 AM
    • Unproposed as answer by ExCessna Friday, March 18, 2016 5:36 PM
    • Marked as answer by ExCessna Friday, March 18, 2016 6:50 PM
    Friday, March 18, 2016 6:28 AM
  • Confirmed. I am able to save images from the camera and pen into Dropbox using:

    Patch(source,Defaults(source),{image: Camera1.Photo}) and a table that includes a column named image[image]

    Pen drawings can be saved too:

    Patch(source,Defaults(source),{image: PenInput1.Image}) into the same table noted above.

    One caveat is that the saved drawing does not have a .png extension for viewing outside PowerApps. You will need to rename it on your own. I forwarded this feedback to PG.

    I don't think you could merge the two images into one jpg. However, if you keep transparency in the ink drawing, you could use this solution. Create two image boxes. Recall the original photo in one image, and recall the drawing with transparency on top.

    Next I am trying to save an image using the "AddMediaButton." So far I'm not able to Patch. AddMediaButton1.Media shows up in an image box, but is not considered an "image" in Patch.

    Patch(source,Defaults(source),{image: AddMediaButton1.Media}) does not work for me. Any luck on your end?

    Monday, March 28, 2016 2:38 AM
  • Brian,

    I finally got the images saved in DropBox...problem was I had too many failed attempts at this objective and the connection I was using didn't connect to the correct spreadsheet, so the paths to the images were incorrect!

    But now the problem remains, how to get the images saved in a SharePoint list. It still seems that the images must be saved in the cloud (OneDrive or Google Drive) or on a website first to avoid having to "upload" them to SharePoint (also in the cloud). SharePoint doesn't allow the fields to be named with a "[image]" suffix...the brackets are not allowed. (I'm getting the idea this suffix is a special construct in PowerApps, correct?)

    To save in SharePoint, each image must have an "http://" address, as I understand it. But to save them in the cloud or on a website first essentially separates the images and the text from each other until they get into SharePoint, which doesn't seem like a real good solution. Nevertheless, I'm going to give it a try.

    I like your idea of using the mediabutton. If you make it work, please post your method.

    Thanks. Hope we can make this work somehow.


    • Edited by ExCessna Thursday, March 31, 2016 1:41 AM clarification
    Tuesday, March 29, 2016 3:15 PM
  • Hi Brian, ExCessna:

    I manage to Patch both Camera and AddPicture.

    (a) When using Camera and AddPicture, I failed. When I used Camera Only, it works. Remember: Once you have Camera and Addpicture in ONE SINGLE apps and fail, attempt to remove Addpicture will still be FAIL. START from a Brand New Apps, purely with Camera only. I had tried more than 4 apps. (Pain but gain!)

    (b) Use Add Picture:

    Please see the attached illustration.

    Wish this really helps and maybe you will get a better idea and a shortcut.

    PG..hopefully you had a better solution than this LONG LONG WAY.

    (NB: You may make the Add picture smaller, the Gallery invisible, leave only IMAGE)


    PK Hong

    Wednesday, April 13, 2016 3:25 PM
  • Hi

    I try to share the Apps and Excel file and images here for download.

    Images:

    https://www.dropbox.com/sh/8fis5izc80nrahm/AAA3B8293RZOS3b1N2qZaOjAa?dl=0

    Excel File:

    https://www.dropbox.com/s/5lsnjjducp2ie0u/hobby.xlsx?dl=0

    Apps:

    https://www.dropbox.com/s/xnna9kxzhik4764/Hobby.msapp?dl=0

    TQ


    PK Hong

    Thursday, April 14, 2016 9:32 AM