Android Question Reference bitmap in SMM?

Marvel

Active Member
Licensed User
If I loaded a panel with an image locally or from the web using Simple Media Manager (SMM), how can I get/reference the loaded bitmap?

For example, I use this code to load an image file with SMM. Since I can't add a bitmap, it's difficult to work on the bitmap before adding it to SMM, so I'm looking for a way to get the bitmap after adding it.
B4X:
MediaManager.SetMediaFromFile(pnl, r.GetSafeDirDefaultExternal("Images"), "image1.png", "image/*", _
CreateMap(MediaManager.REQUEST_RESIZE_MODE : "FILL_NO_DISTORTIONS"))
 
Solution
You can get it with:
B4X:
Wait For (pnl) SMM_MediaReady (Success As Boolean, Media As SMMedia)
    If Success Then
        Dim bmp As B4XBitmap = Media.Media
    End If

Marvel

Active Member
Licensed User
I need to decrease the saturation of an image with bitmap effects creator to form a thumbnail and I'm trying to do it on the fly
 
Upvote 0
Top