image
文章平均质量分 63
濯君
求知,内敛,有趣,勤静
展开
-
安卓官方解决加载图片内存溢出问题
1.计算options.inSampleSize public static int calculateInSampleSize( BitmapFactory.Options options, int reqWidth, int reqHeight) { // Raw height and width of image final int height =转载 2016-09-10 16:51:41 · 532 阅读 · 0 评论 -
解决 out of memory 的方法
private Bitmap decodeBitmap(File file){ try{ BitmapFactory.Options o = new BitmapFactory.Options(); o.inJustDecodeBounds = true; BitmapFactory.decodeStream(原创 2016-09-14 18:24:09 · 2122 阅读 · 0 评论 -
安卓用手指触碰屏幕缩放和移动,三指触碰屏幕旋转图片
原文链接 package com.multitouch.example; import android.app.Activity; import android.graphics.Matrix; import android.graphics.PointF; import android.os.Bundle; import android.util.FloatMath; import andr转载 2016-09-14 18:37:10 · 1947 阅读 · 1 评论 -
调用手机里其他应用分享链接,图片
1.分享链接 private void shareTextUrl() { Intent share = new Intent(android.content.Intent.ACTION_SEND); share.setType("text/plain"); share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHE原创 2016-08-23 15:59:36 · 872 阅读 · 0 评论 -
获取视频文件缩略图
Bitmap thumb = ThumbnailUtils.createVideoThumbnail(path, MediaStore.Images.Thumbnails.MINI_KIND);原创 2016-09-22 19:00:59 · 1172 阅读 · 0 评论 -
Android Memory: Reduce, Reuse, Recycle
原文链接 Development on most platforms has it source of frustrations. Android is no different. One of the main sources of developer angst in Android is memory, as we never seem to have enough of it.转载 2016-09-11 11:19:33 · 627 阅读 · 0 评论 -
python把图片按两条中线裁剪成四张
from PIL import Image import os import glob def crop(im, height, width): # im = Image.open(infile) imgwidth, imgheight = im.size for i in range(int(imgheight // height)): for j i...转载 2019-05-13 11:16:59 · 931 阅读 · 3 评论