Android Question Adding frames to photos

apty

Active Member
Licensed User
Longtime User
Hi friends,

Is there any b4a library that can assist me add a frame to a photo? I have managed to select the photo and now I want to add a frame to it. Any assistance will be appreciated
 

wonder

Expert
Licensed User
Longtime User
Hi!!

Do you mean saving the frame in the bitmap itself or just displaying the image on screen within a frame?

In case you just want to display it on screen, one easy solution is to add a slightly larger panel behind the image.

Something like (pseudo-code):

B4X:
AddPanel name_of_the_image.panel (same center (x,y) as the image center (x,y), only 3% larger)
Image.BringToFront

If you need, I can provide you the exact B4A code later. :)
 
Last edited:
Upvote 0

apty

Active Member
Licensed User
Longtime User
Thanks a lot. I want to add the frame and then save it with the image. Please help with sample B4a code. I will appreciate a lot

I need something like the attached
 

Attachments

  • frame.jpg
    frame.jpg
    52.1 KB · Views: 130
Upvote 0

apty

Active Member
Licensed User
Longtime User
Thanks Erel. I tried looking at the 9 patch images tutorial but i didn't manage to apply it to my case.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Hi!!

Do you mean saving the frame in the bitmap itself or just displaying the image on screen within a frame?

In case you just want to display it on screen, one easy solution is to add a slightly larger panel behind the image.

Something like (pseudo-code):

B4X:
AddPanel name_of_the_image.panel (same center (x,y) as the image center (x,y), only 3% larger)
Image.BringToFront

If you need, I can provide you the exact B4A code later. :)
hi, can you please provide the code that you mentioned here if you dont mind? ;)
 
Upvote 0
Top