mapbox-maps-android icon indicating copy to clipboard operation
mapbox-maps-android copied to clipboard

Add more Image Types (other than Bitmap)

Open anox1337 opened this issue 7 months ago • 0 comments

New Feature

I have a RasterLayer with an ImageSource. ImagesSource gets updated via: updateimage This function takes a Bitmap or an Image (which is in itself a Bitmap) It would be nice if we could also add other types (e.g. PNG) to the ImageSource

Why

A common case where this would be useful is when we want to show external images as a quad on the map. These external images are almost never Bitmaps but most of the time base64 encoded PNGs. So the current workflow is:

  • Get Base64 Image
  • Decode Base64 Image into PNG
  • Create Bitmap from PNG
  • Pass Bitmap bytes to Imagesource

I would really like to avoid converting images from one common type to another.

anox1337 avatar Jul 11 '24 11:07 anox1337