Java Code Examples for com.easemob.util.ImageUtils#decodeScaleImage()

The following examples show how to use com.easemob.util.ImageUtils#decodeScaleImage() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoadImageTask.java    From FanXin-based-HuanXin with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected Bitmap doInBackground(Object... args) {
	thumbnailPath = (String) args[0];
	localFullSizePath = (String) args[1];
	remotePath = (String) args[2];
	chatType = (ChatType) args[3];
	iv = (ImageView) args[4];
	// if(args[2] != null) {
	activity = (Activity) args[5];
	// }
	message = (EMMessage) args[6];
	File file = new File(thumbnailPath);
	if (file.exists()) {
		return ImageUtils.decodeScaleImage(thumbnailPath, 160, 160);
	} else {
		if (message.direct == EMMessage.Direct.SEND) {
			return ImageUtils.decodeScaleImage(localFullSizePath, 160, 160);
		} else {
			return null;
		}
	}
	

}
 
Example 2
Source File: LoadImageTask.java    From school_shop with MIT License 6 votes vote down vote up
@Override
protected Bitmap doInBackground(Object... args) {
	thumbnailPath = (String) args[0];
	localFullSizePath = (String) args[1];
	remotePath = (String) args[2];
	chatType = (ChatType) args[3];
	iv = (ImageView) args[4];
	// if(args[2] != null) {
	activity = (Activity) args[5];
	// }
	message = (EMMessage) args[6];
	File file = new File(thumbnailPath);
	if (file.exists()) {
		return ImageUtils.decodeScaleImage(thumbnailPath, 160, 160);
	} else {
		if (message.direct == EMMessage.Direct.SEND) {
			return ImageUtils.decodeScaleImage(localFullSizePath, 160, 160);
		} else {
			return null;
		}
	}
	

}
 
Example 3
Source File: LoadVideoImageTask.java    From FanXin-based-HuanXin with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected Bitmap doInBackground(Object... params) {
	thumbnailPath = (String) params[0];
	thumbnailUrl = (String) params[1];
	iv = (ImageView) params[2];
	activity = (Activity) params[3];
	message = (EMMessage) params[4];
	adapter = (BaseAdapter) params[5];
	if (new File(thumbnailPath).exists()) {
		return ImageUtils.decodeScaleImage(thumbnailPath, 120, 120);
	} else {
		return null;
	}
}
 
Example 4
Source File: EaseLoadLocalBigImgTask.java    From monolog-android with MIT License 4 votes vote down vote up
@Override
protected Bitmap doInBackground(Void... params) {
	Bitmap bitmap = ImageUtils.decodeScaleImage(path, width, height);
	return bitmap;
}
 
Example 5
Source File: LoadLocalBigImgTask.java    From FanXin-based-HuanXin with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected Bitmap doInBackground(Void... params) {
	Bitmap bitmap = ImageUtils.decodeScaleImage(path, width, height);
	return bitmap;
}
 
Example 6
Source File: LoadLocalBigImgTask.java    From school_shop with MIT License 4 votes vote down vote up
@Override
protected Bitmap doInBackground(Void... params) {
	Bitmap bitmap = ImageUtils.decodeScaleImage(path, width, height);
	return bitmap;
}