hyphenate_SDK3.0  3.0.1
hyphenatejavaIMSDK
静态 Public 成员函数 | 静态 Public 属性 | 所有成员列表
com.hyphenate.util.ImageUtils类 参考

静态 Public 成员函数

static Bitmap getRoundedCornerBitmap (Bitmap bitmap)
 
static Bitmap getRoundedCornerBitmap (Bitmap bitmap, float radius)
 
static Bitmap getVideoThumbnail (String videoPath, int width, int height, int kind)
 
static String saveVideoThumb (File videoFile, int width, int height, int kind)
 
static Bitmap decodeScaleImage (String imagePath, int reqWidth, int reqHeight)
 
static Bitmap decodeScaleImage (Context context, int drawableId, int reqWidth, int reqHeight)
 
static int calculateInSampleSize (BitmapFactory.Options options, int reqWidth, int reqHeight)
 
static String getThumbnailImage (String imagePath, int thumbnailSize)
 
static String getScaledImage (Context appContext, String imagePath)
 
static String getScaledImage (Context appContext, String imagePath, int i)
 
static Bitmap mergeImages (int targetWidth, int targetHeight, List< Bitmap > images)
 
static int readPictureDegree (String path)
 
static Bitmap rotaingImageView (int angle, Bitmap bitmap)
 
static Options getBitmapOptions (String imagePath)
 

静态 Public 属性

static final int SCALE_IMAGE_WIDTH = 640
 
static final int SCALE_IMAGE_HEIGHT = 960
 

成员函数说明

static Options com.hyphenate.util.ImageUtils.getBitmapOptions ( String  imagePath)
static

get bitmap options

参数
imagePath
返回
static String com.hyphenate.util.ImageUtils.getScaledImage ( Context  appContext,
String  imagePath 
)
static

deu to the network bandwidth limitation, we will scale image to smaller size before send out

参数
static String com.hyphenate.util.ImageUtils.getScaledImage ( Context  appContext,
String  imagePath,
int  i 
)
static

得到"eaemobTemp"+i.jpg为文件名的临时图片

参数
imagePath
i
返回
static Bitmap com.hyphenate.util.ImageUtils.getVideoThumbnail ( String  videoPath,
int  width,
int  height,
int  kind 
)
static

获取视频的缩略图 先通过ThumbnailUtils来创建一个视频的缩略图,然后再利用ThumbnailUtils来生成指定大小的缩略图。 如果想要的缩略图的宽和高都小于MICRO_KIND,则类型要使用MICRO_KIND作为kind的值,这样会节省内存

参数
videoPath视频的路径
width指定输出视频缩略图的宽度
height指定输出视频缩略图的高度
kind参照MediaStore。Images.Thumbnails类中的常量MINI_KIND和MICRO_KIND. 其中,MINI_KIND:512*384,MICRO_KIND:96*96
返回
指定大小的视频缩略图
static Bitmap com.hyphenate.util.ImageUtils.mergeImages ( int  targetWidth,
int  targetHeight,
List< Bitmap >  images 
)
static

merge multiple images into one the result will be 2*2 images or 3*3 images

参数
targetWidth
targetHeight
images
返回
static int com.hyphenate.util.ImageUtils.readPictureDegree ( String  path)
static

读取图片属性:旋转的角度

参数
path图片绝对路径
返回
degree旋转的角度
static String com.hyphenate.util.ImageUtils.saveVideoThumb ( File  videoFile,
int  width,
int  height,
int  kind 
)
static

保存video的缩略图

参数
videoFile视频文件
width指定输出视频缩略图的宽度
height指定输出视频缩略图的高度
kind参照MediaStore。Images.Thumbnails类中的常量MINI_KIND和MICRO_KIND. 其中,MINI_KIND:512*384,MICRO_KIND:96*96
返回
缩略图绝对路径

该类的文档由以下文件生成: