本文整理汇总了Java中org.telegram.tgnet.TLRPC.TL_photo方法的典型用法代码示例。如果您正苦于以下问题:Java TLRPC.TL_photo方法的具体用法?Java TLRPC.TL_photo怎么用?Java TLRPC.TL_photo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.telegram.tgnet.TLRPC
的用法示例。
在下文中一共展示了TLRPC.TL_photo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generatePhotoSizes
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public TLRPC.TL_photo generatePhotoSizes(String path, Uri imageUri) {
Bitmap bitmap = ImageLoader.loadBitmap(path, imageUri, AndroidUtilities.getPhotoSize(), AndroidUtilities.getPhotoSize(), true);
if (bitmap == null && AndroidUtilities.getPhotoSize() != 800) {
bitmap = ImageLoader.loadBitmap(path, imageUri, 800, 800, true);
}
ArrayList<TLRPC.PhotoSize> sizes = new ArrayList<>();
TLRPC.PhotoSize size = ImageLoader.scaleAndSaveImage(bitmap, 90, 90, 55, true);
if (size != null) {
sizes.add(size);
}
size = ImageLoader.scaleAndSaveImage(bitmap, AndroidUtilities.getPhotoSize(), AndroidUtilities.getPhotoSize(), 80, false, 101, 101);
if (size != null) {
sizes.add(size);
}
if (bitmap != null) {
bitmap.recycle();
}
if (sizes.isEmpty()) {
return null;
} else {
UserConfig.saveConfig(false);
TLRPC.TL_photo photo = new TLRPC.TL_photo();
photo.date = ConnectionsManager.getInstance().getCurrentTime();
photo.sizes = sizes;
return photo;
}
}
示例2: sendMessage
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendMessage(TLRPC.TL_photo photo, String path, long peer, MessageObject reply_to_msg, TLRPC.ReplyMarkup replyMarkup, HashMap<String, String> params) {
sendMessage(null, null, photo, null, null, null, peer, path, reply_to_msg, null, true, null, null, replyMarkup, params);
}
示例3: sendMessage
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendMessage(TLRPC.TL_photo photo, String path, long peer, MessageObject reply_to_msg, TLRPC.ReplyMarkup replyMarkup, HashMap<String, String> params) {
sendMessage(null, null, photo, null, null, null, null, peer, path, reply_to_msg, null, true, null, null, replyMarkup, params);
}