Android Question [SOLVED]Picture Not Displayed On Panel

Big Dave

Member
Licensed User
Longtime User
pnlPhoto.SetBackgroundImage(LoadBitmapSample(ECS00.PhotoFolder, _
ECS20.strSelectedReceiptID & ".jpg", 370dip, 350dip).Rotate(90))

I am trying to display a picture on a panel and all I see is a black panel (ECS21). The same coding is used in an earlier part of the app (ECS20) and works just fine. I am using CameraEx so I suspect this could be the problem but cannot see exactly what.

File.Delete(ECS00.PhotoFolder, ECS20.strSelectedReceiptID & ".jpg")
camEx.SavePictureToFile(Buffer, ECS00.PhotoFolder, ECS20.strSelectedReceiptID & ".jpg")

Also I am trying to update the same picture file with an updated picture and cannot get this to work. Do you delete the original and create a new file or can you "rewrite" with the new picture (ECS21/lblTapForPhoto_Click)

I have spent most of the day trying to work these two gems out, any help would be appreciated. Thanks
 

Attachments

  • ExpenseClaimsSystem.zip
    60 KB · Views: 267

Big Dave

Member
Licensed User
Longtime User
To resolve the first problem I added another panel and displayed the original picture. When I wanted to take a picture I hid the new panel to reveal the original panel with the camera in view. Not sure if this is a work around but it works.

The second problem has been resolved by moving the picture save to the point where I exit the view. For some reason if you take a picture and then immediately save it, it saves an empty file. Yet saved at a later point works ok. Almost suggests that the picture create needs time to "buffer" the data. Would really like to know if anyone has an answer for this.
 
Upvote 0
Top