[android] - add conversion of non ARGB_8888 images to c++, expose Bitmap#copy on the c++ side

This commit is contained in:
Tobrun
2018-02-02 11:16:01 +01:00
committed by Tobrun
parent 0b27909b8b
commit ff747a8c53
3 changed files with 10 additions and 6 deletions

View File

@@ -759,10 +759,7 @@ final class NativeMapView {
}
// Determine pixel ratio
float density = image.getDensity() == Bitmap.DENSITY_NONE ? Bitmap.DENSITY_NONE : image.getDensity();
float pixelRatio = density / DisplayMetrics.DENSITY_DEFAULT;
nativeAddImage(name, image, pixelRatio);
nativeAddImage(name, image, image.getDensity() / DisplayMetrics.DENSITY_DEFAULT);
}
public void addImages(@NonNull HashMap<String, Bitmap> bitmapHashMap) {