com.supermap.mapping
Class BitmapUtils
- java.lang.Object
-
- com.supermap.mapping.BitmapUtils
-
public class BitmapUtils extends java.lang.Objectauthor : linwenhao date : 2021/12/22 10:51 desc : bitmap Utility class, inner class version: 1.0
-
-
Constructor Summary
Constructors Constructor and Description BitmapUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static android.graphics.BitmapcompressBitmap(android.graphics.Bitmap bitmap, float many)Picture quality compressionstatic android.graphics.BitmapcreateReflectionBitmap(android.graphics.Bitmap bitmap, float region)Get the inverted image methodstatic android.graphics.BitmapcropBitmap(android.graphics.Bitmap bitmap, float wScale, float hScale)Crop the picture to scalestatic android.graphics.BitmapmergeBitmap(android.graphics.Bitmap backBitmap, android.graphics.Bitmap frontBitmap)Overlay two bitmaps into a single bitmap based on the length and width of the underlying bitmapstatic android.graphics.BitmapscaleWithWH(android.graphics.Bitmap bitmap, double w, double h)Picture zoomingstatic android.graphics.BitmapviewSnapshot(android.view.View view)Take a screenshot of the View(excluding the SurfaceView)
-
-
-
Method Detail
-
mergeBitmap
public static android.graphics.Bitmap mergeBitmap(android.graphics.Bitmap backBitmap, android.graphics.Bitmap frontBitmap)Overlay two bitmaps into a single bitmap based on the length and width of the underlying bitmap- Parameters:
backBitmap- at the bottom of the bitmapfrontBitmap- covers the bitmap above- Returns:
-
viewSnapshot
public static android.graphics.Bitmap viewSnapshot(android.view.View view)
Take a screenshot of the View(excluding the SurfaceView)
-
scaleWithWH
public static android.graphics.Bitmap scaleWithWH(android.graphics.Bitmap bitmap, double w, double h)Picture zooming- Parameters:
bitmap- bitmapw- New widthh- New height- Returns:
- Bitmap
-
cropBitmap
public static android.graphics.Bitmap cropBitmap(android.graphics.Bitmap bitmap, float wScale, float hScale)Crop the picture to scale- Parameters:
bitmap-wScale- clipping width 0~100%hScale- clipping height 0~100%
-
createReflectionBitmap
public static android.graphics.Bitmap createReflectionBitmap(android.graphics.Bitmap bitmap, float region)Get the inverted image method- Parameters:
bitmap-region- Reflection region 0.1 to 1- Returns:
- bitmap
-
compressBitmap
public static android.graphics.Bitmap compressBitmap(android.graphics.Bitmap bitmap, float many)Picture quality compression- Parameters:
bitmap-many- percentage- Returns:
-
-