Marvel Active Member Licensed User Mar 20, 2022 #1 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"))
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 Erel Mar 21, 2022 You can get it with: Code: Wait For (pnl) SMM_MediaReady (Success As Boolean, Media As SMMedia) If Success Then Dim bmp As B4XBitmap = Media.Media End If
You can get it with: Code: Wait For (pnl) SMM_MediaReady (Success As Boolean, Media As SMMedia) If Success Then Dim bmp As B4XBitmap = Media.Media End If
Erel B4X founder Staff member Licensed User Longtime User Mar 21, 2022 #2 What do you want to do with the bitmap? It is possible to access it with the MediaReady event: https://www.b4x.com/android/forum/t...for-images-videos-and-more.134716/post-854161 SMM handles all kinds of different types of medias and the views created varies depending on the media type and the settings. Upvote 0
What do you want to do with the bitmap? It is possible to access it with the MediaReady event: https://www.b4x.com/android/forum/t...for-images-videos-and-more.134716/post-854161 SMM handles all kinds of different types of medias and the views created varies depending on the media type and the settings.
Marvel Active Member Licensed User Mar 21, 2022 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Mar 21, 2022 #4 You can get it with: Code: Wait For (pnl) SMM_MediaReady (Success As Boolean, Media As SMMedia) If Success Then Dim bmp As B4XBitmap = Media.Media End If Upvote 0 Solution
You can get it with: Code: Wait For (pnl) SMM_MediaReady (Success As Boolean, Media As SMMedia) If Success Then Dim bmp As B4XBitmap = Media.Media End If