ThumbnailUtils.extractThumbnail Android图片缩略图显示总结及比较
博客源址:Android图片缩放总结及比较
博客时间:2011-08-01 17:42
首先要获得原bitmap,再从原bitmap的基础上生成新图片。这样效率很低。
下面是我的例子:
- <?xmlversion="1.0"encoding="utf-8"?>
- <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
- <ImageView
- android:id="@+id/imageShow"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- />
- <ImageView
- android:id="@+id/image2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- />
- <TextView
- android:id="@+id/text"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/hello"
- />
- </LinearLayout>
- packagecom.linc.ResolvePicture;
- importjava.io.File;
- importjava.io.FileNotFoundException;
- importjava.io.FileOutputStream;
- importjava.io.IOException;
- importandroid.app.Activity;
- importandroid.graphics.Bitmap;
- importandroid.graphics.BitmapFactory;
- importandroid.graphics.Matrix;
- importandroid.graphics.drawable.BitmapDrawable;
- importandroid.graphics.drawable.Drawable;
- importandroid.media.ThumbnailUtils;
- importandroid.os.Bundle;
- importandroid.util.Log;
- importandroid.widget.ImageView;
- importandroid.widget.TextView;
- publicclassResolvePictureextendsActivity {
- privatestaticString tag="ResolvePicture";
- Drawable bmImg;
- ImageView imView;
- ImageView imView2;
- TextView text;
- String theTime;
- longstart, stop;
- /** Called when the activity is first created. */
- @Override
- publicvoidonCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- text=(TextView)findViewById(R.id.text);
- imView=(ImageView) findViewById(R.id.imageShow);
- imView2=(ImageView) findViewById(R.id.image2);
- /**pic大时(2M+)直接OOM,后面还裁剪个屁啊*/
- Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
- R.drawable.pic);
- start=System.currentTimeMillis();
- // imView.setImageDrawable(resizeImage(bitmap, 300, 100));
- imView2.setImageDrawable(resizeImage2("/sdcard/2.jpeg",200,100));
- stop=System.currentTimeMillis();
- String theTime= String.format("\n1 iterative: (%d msec)",
- stop - start);
- start=System.currentTimeMillis();
- imView.setImageBitmap(ThumbnailUtils.extractThumbnail(bitmap,200,100));//2.2才加进来的新类,简单易用
- // imView.setImageDrawable(resizeImage(bitmap, 30, 30));
- stop=System.currentTimeMillis();
- theTime+= String.format("\n2 iterative: (%d msec)",
- stop - start);
- text.setText(theTime);
- }
- //使用Bitmap加Matrix来缩放
- publicstaticDrawable resizeImage(Bitmap bitmap,intw,inth)
- {
- Bitmap BitmapOrg = bitmap;
- intwidth = BitmapOrg.getWidth();
- intheight = BitmapOrg.getHeight();
- intnewWidth = w;
- intnewHeight = h;
- floatscaleWidth = ((float) newWidth) / width;
- floatscaleHeight = ((float) newHeight) / height;
- Matrix matrix = newMatrix();
- matrix.postScale(scaleWidth, scaleHeight);
- // if you want to rotate the Bitmap
- // matrix.postRotate(45);
- Bitmap resizedBitmap = Bitmap.createBitmap(BitmapOrg, 0,0, width,
- height, matrix, true);
- returnnewBitmapDrawable(resizedBitmap);
- }
- //使用BitmapFactory.Options的inSampleSize参数来缩放
- publicstaticDrawable resizeImage2(String path,
- intwidth,intheight)
- {
- BitmapFactory.Options options = newBitmapFactory.Options();
- options.inJustDecodeBounds = true;//不加载bitmap到内存中
- BitmapFactory.decodeFile(path,options);
- intoutWidth = options.outWidth;
- intoutHeight = options.outHeight;
- options.inDither = false;
- options.inPreferredConfig = Bitmap.Config.ARGB_8888;
- options.inSampleSize = 1;
- if(outWidth !=0&& outHeight !=0&& width !=0&& height !=0)
- {
- intsampleSize=(outWidth/width+outHeight/height)/2;
- Log.d(tag, "sampleSize = "+ sampleSize);
- options.inSampleSize = sampleSize;
- }
- options.inJustDecodeBounds = false;
- returnnewBitmapDrawable(BitmapFactory.decodeFile(path, options));
- }
- //图片保存
- privatevoidsaveThePicture(Bitmap bitmap)
- {
- File file=newFile("/sdcard/2.jpeg");
- try
- {
- FileOutputStream fos=newFileOutputStream(file);
- if(bitmap.compress(Bitmap.CompressFormat.JPEG,100, fos))
- {
- fos.flush();
- fos.close();
- }
- }
- catch(FileNotFoundException e1)
- {
- e1.printStackTrace();
- }
- catch(IOException e2)
- {
- e2.printStackTrace();
- }
- }
- }
- /*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- packageandroid.media;
- importandroid.content.ContentResolver;
- importandroid.content.ContentUris;
- importandroid.content.ContentValues;
- importandroid.database.Cursor;
- importandroid.graphics.Bitmap;
- importandroid.graphics.BitmapFactory;
- importandroid.graphics.Canvas;
- importandroid.graphics.Matrix;
- importandroid.graphics.Rect;
- importandroid.media.MediaMetadataRetriever;
- importandroid.media.MediaFile.MediaFileType;
- importandroid.net.Uri;
- importandroid.os.ParcelFileDescriptor;
- importandroid.provider.BaseColumns;
- importandroid.provider.MediaStore.Images;
- importandroid.provider.MediaStore.Images.Thumbnails;
- importandroid.util.Log;
- importjava.io.FileInputStream;
- importjava.io.FileDescriptor;
- importjava.io.IOException;
- importjava.io.OutputStream;
- /**
- * Thumbnail generation routines for media provider.
- */
- publicclassThumbnailUtils {
- privatestaticfinalString TAG ="ThumbnailUtils";
- /* Maximum pixels size for created bitmap. */
- privatestaticfinalintMAX_NUM_PIXELS_THUMBNAIL =512*384;
- privatestaticfinalintMAX_NUM_PIXELS_MICRO_THUMBNAIL =128*128;
- privatestaticfinalintUNCONSTRAINED = -1;
- /* Options used internally. */
- privatestaticfinalintOPTIONS_NONE =0x0;
- privatestaticfinalintOPTIONS_SCALE_UP =0x1;
- /**
- * Constant used to indicate we should recycle the input in
- * {@link #extractThumbnail(Bitmap, int, int, int)} unless the output is the input.
- */
- publicstaticfinalintOPTIONS_RECYCLE_INPUT =0x2;
- /**
- * Constant used to indicate the dimension of mini thumbnail.
- * @hide Only used by media framework and media provider internally.
- */
- publicstaticfinalintTARGET_SIZE_MINI_THUMBNAIL =320;
- /**
- * Constant used to indicate the dimension of micro thumbnail.
- * @hide Only used by media framework and media provider internally.
- */
- publicstaticfinalintTARGET_SIZE_MICRO_THUMBNAIL =96;
- /**
- * This method first examines if the thumbnail embedded in EXIF is bigger than our target
- * size. If not, then it'll create a thumbnail from original image. Due to efficiency
- * consideration, we want to let MediaThumbRequest avoid calling this method twice for
- * both kinds, so it only requests for MICRO_KIND and set saveImage to true.
- *
- * This method always returns a "square thumbnail" for MICRO_KIND thumbnail.
- *
- * @param filePath the path of image file
- * @param kind could be MINI_KIND or MICRO_KIND
- * @return Bitmap
- *
- * @hide This method is only used by media framework and media provider internally.
- */
- publicstaticBitmap createImageThumbnail(String filePath,intkind) {
- booleanwantMini = (kind == Images.Thumbnails.MINI_KIND);
- inttargetSize = wantMini
- ? TARGET_SIZE_MINI_THUMBNAIL
- : TARGET_SIZE_MICRO_THUMBNAIL;
- intmaxPixels = wantMini
- ? MAX_NUM_PIXELS_THUMBNAIL
- : MAX_NUM_PIXELS_MICRO_THUMBNAIL;
- SizedThumbnailBitmap sizedThumbnailBitmap = newSizedThumbnailBitmap();
- Bitmap bitmap = null;
- MediaFileType fileType = MediaFile.getFileType(filePath);
- if(fileType !=null&& fileType.fileType == MediaFile.FILE_TYPE_JPEG) {
- createThumbnailFromEXIF(filePath, targetSize, maxPixels, sizedThumbnailBitmap);
- bitmap = sizedThumbnailBitmap.mBitmap;
- }
- if(bitmap ==null) {
- try{
- FileDescriptor fd = newFileInputStream(filePath).getFD();
- BitmapFactory.Options options = newBitmapFactory.Options();
- options.inSampleSize = 1;
- options.inJustDecodeBounds = true;
- BitmapFactory.decodeFileDescriptor(fd, null, options);
- if(options.mCancel || options.outWidth == -1
- || options.outHeight == -1) {
- returnnull;
- }
- options.inSampleSize = computeSampleSize(
- options, targetSize, maxPixels);
- options.inJustDecodeBounds = false;
- options.inDither = false;
- options.inPreferredConfig = Bitmap.Config.ARGB_8888;
- bitmap = BitmapFactory.decodeFileDescriptor(fd, null, options);
- } catch(IOException ex) {
- Log.e(TAG, "", ex);
- }
- }
- if(kind == Images.Thumbnails.MICRO_KIND) {
- // now we make it a "square thumbnail" for MICRO_KIND thumbnail
- bitmap = extractThumbnail(bitmap,
- TARGET_SIZE_MICRO_THUMBNAIL,
- TARGET_SIZE_MICRO_THUMBNAIL, OPTIONS_RECYCLE_INPUT);
- }
- returnbitmap;
- }
- /**
- * Create a video thumbnail for a video. May return null if the video is
- * corrupt or the format is not supported.
- *
- * @param filePath the path of video file
- * @param kind could be MINI_KIND or MICRO_KIND
- */
- publicstaticBitmap createVideoThumbnail(String filePath,intkind) {
- Bitmap bitmap = null;
- MediaMetadataRetriever retriever = newMediaMetadataRetriever();
- try{
- retriever.setMode(MediaMetadataRetriever.MODE_CAPTURE_FRAME_ONLY);
- retriever.setDataSource(filePath);
- bitmap = retriever.captureFrame();
- } catch(IllegalArgumentException ex) {
- // Assume this is a corrupt video file
- } catch(RuntimeException ex) {
- // Assume this is a corrupt video file.
- } finally{
- try{
- retriever.release();
- } catch(RuntimeException ex) {
- // Ignore failures while cleaning up.
- }
- }
- if(kind == Images.Thumbnails.MICRO_KIND && bitmap !=null) {
- bitmap = extractThumbnail(bitmap,
- TARGET_SIZE_MICRO_THUMBNAIL,
- TARGET_SIZE_MICRO_THUMBNAIL,
- OPTIONS_RECYCLE_INPUT);
- }
- returnbitmap;
- }
- /**
- * Creates a centered bitmap of the desired size.
- *
- * @param source original bitmap source
- * @param width targeted width
- * @param height targeted height
- */
- publicstaticBitmap extractThumbnail(
- Bitmap source, intwidth,intheight) {
- returnextractThumbnail(source, width, height, OPTIONS_NONE);
- }
- /**
- * Creates a centered bitmap of the desired size.
- *
- * @param source original bitmap source
- * @param width targeted width
- * @param height targeted height
- * @param options options used during thumbnail extraction
- */
- publicstaticBitmap extractThumbnail(
- Bitmap source, intwidth,intheight,intoptions) {
- if(source ==null) {
- returnnull;
- }
- floatscale;
- if(source.getWidth() < source.getHeight()) {
- scale = width / (float) source.getWidth();
- } else{
- scale = height / (float) source.getHeight();
- }
- Matrix matrix = newMatrix();
- matrix.setScale(scale, scale);
- Bitmap thumbnail = transform(matrix, source, width, height,
- OPTIONS_SCALE_UP | options);
- returnthumbnail;
- }
- /*
- * Compute the sample size as a function of minSideLength
- * and maxNumOfPixels.
- * minSideLength is used to specify that minimal width or height of a
- * bitmap.
- * maxNumOfPixels is used to specify the maximal size in pixels that is
- * tolerable in terms of memory usage.
- *
- * The function returns a sample size based on the constraints.
- * Both size and minSideLength can be passed in as IImage.UNCONSTRAINED,
- * which indicates no care of the corresponding constraint.
- * The functions prefers returning a sample size that
- * generates a smaller bitmap, unless minSideLength = IImage.UNCONSTRAINED.
- *
- * Also, the function rounds up the sample size to a power of 2 or multiple
- * of 8 because BitmapFactory only honors sample size this way.
- * For example, BitmapFactory downsamples an image by 2 even though the
- * request is 3. So we round up the sample size to avoid OOM.
- */
- privatestaticintcomputeSampleSize(BitmapFactory.Options options,
- intminSideLength,intmaxNumOfPixels) {
- intinitialSize = computeInitialSampleSize(options, minSideLength,
- maxNumOfPixels);
- introundedSize;
- if(initialSize <=8) {
- roundedSize = 1;
- while(roundedSize < initialSize) {
- roundedSize <<= 1;
- }
- } else{
- roundedSize = (initialSize + 7) /8*8;
- }
- returnroundedSize;
- }
- privatestaticintcomputeInitialSampleSize(BitmapFactory.Options options,
- intminSideLength,intmaxNumOfPixels) {
- doublew = options.outWidth;
- doubleh = options.outHeight;
- intlowerBound = (maxNumOfPixels == UNCONSTRAINED) ?1:
- (int) Math.ceil(Math.sqrt(w * h / maxNumOfPixels));
- intupperBound = (minSideLength == UNCONSTRAINED) ?128:
- (int) Math.min(Math.floor(w / minSideLength),
- Math.floor(h / minSideLength));
- if(upperBound < lowerBound) {
- // return the larger one when there is no overlapping zone.
- returnlowerBound;
- }
- if((maxNumOfPixels == UNCONSTRAINED) &&
- (minSideLength == UNCONSTRAINED)) {
- return1;
- } elseif(minSideLength == UNCONSTRAINED) {
- returnlowerBound;
- } else{
- returnupperBound;
- }
- }
- /**
- * Make a bitmap from a given Uri, minimal side length, and maximum number of pixels.
- * The image data will be read from specified pfd if it's not null, otherwise
- * a new input stream will be created using specified ContentResolver.
- *
- * Clients are allowed to pass their own BitmapFactory.Options used for bitmap decoding. A
- * new BitmapFactory.Options will be created if options is null.
- */
- privatestaticBitmap makeBitmap(intminSideLength,intmaxNumOfPixels,
- Uri uri, ContentResolver cr, ParcelFileDescriptor pfd,
- BitmapFactory.Options options) {
- Bitmap b = null;
- try{
- if(pfd ==null) pfd = makeInputStream(uri, cr);
- if(pfd ==null)returnnull;
- if(options ==null) options =newBitmapFactory.Options();
- FileDescriptor fd = pfd.getFileDescriptor();
- options.inSampleSize = 1;
- options.inJustDecodeBounds = true;
- BitmapFactory.decodeFileDescriptor(fd, null, options);
- if(options.mCancel || options.outWidth == -1
- || options.outHeight == -1) {
- returnnull;
- }
- options.inSampleSize = computeSampleSize(
- options, minSideLength, maxNumOfPixels);
- options.inJustDecodeBounds = false;
- options.inDither = false;
- options.inPreferredConfig = Bitmap.Config.ARGB_8888;
- b = BitmapFactory.decodeFileDescriptor(fd, null, options);
- } catch(OutOfMemoryError ex) {
- Log.e(TAG, "Got oom exception ", ex);
- returnnull;
- } finally{
- closeSilently(pfd);
- }
- returnb;
- }
- privatestaticvoidcloseSilently(ParcelFileDescriptor c) {
- if(c ==null)return;
- try{
- c.close();
- } catch(Throwable t) {
- // do nothing
- }
- }
- privatestaticParcelFileDescriptor makeInputStream(
- Uri uri, ContentResolver cr) {
- try{
- returncr.openFileDescriptor(uri,"r");
- } catch(IOException ex) {
- returnnull;
- }
- }
- /**
- * Transform source Bitmap to targeted width and height.
- */
- privatestaticBitmap transform(Matrix scaler,
- Bitmap source,
- inttargetWidth,
- inttargetHeight,
- intoptions) {
- booleanscaleUp = (options & OPTIONS_SCALE_UP) !=0;
- booleanrecycle = (options & OPTIONS_RECYCLE_INPUT) !=0;
- intdeltaX = source.getWidth() - targetWidth;
- intdeltaY = source.getHeight() - targetHeight;
- if(!scaleUp && (deltaX <0|| deltaY <0)) {
- /*
- * In this case the bitmap is smaller, at least in one dimension,
- * than the target. Transform it by placing as much of the image
- * as possible into the target and leaving the top/bottom or
- * left/right (or both) black.
- */
- Bitmap b2 = Bitmap.createBitmap(targetWidth, targetHeight,
- Bitmap.Config.ARGB_8888);
- Canvas c = newCanvas(b2);
- intdeltaXHalf = Math.max(0, deltaX /2);
- intdeltaYHalf = Math.max(0, deltaY /2);
- Rect src = newRect(
- deltaXHalf,
- deltaYHalf,
- deltaXHalf + Math.min(targetWidth, source.getWidth()),
- deltaYHalf + Math.min(targetHeight, source.getHeight()));
- intdstX = (targetWidth - src.width()) /2;
- intdstY = (targetHeight - src.height()) /2;
- Rect dst = newRect(
- dstX,
- dstY,
- targetWidth - dstX,
- targetHeight - dstY);
- c.drawBitmap(source, src, dst, null);
- if(recycle) {
- source.recycle();
- }
- returnb2;
- }
- floatbitmapWidthF = source.getWidth();
- floatbitmapHeightF = source.getHeight();
- floatbitmapAspect = bitmapWidthF / bitmapHeightF;
- floatviewAspect = (float) targetWidth / targetHeight;
- if(bitmapAspect > viewAspect) {
- floatscale = targetHeight / bitmapHeightF;
- if(scale < .9F || scale > 1F) {
- scaler.setScale(scale, scale);
- } else{
- scaler = null;
- }
- } else{
- floatscale = targetWidth / bitmapWidthF;
- if(scale < .9F || scale > 1F) {
- scaler.setScale(scale, scale);
- } else{
- scaler = null;
- }
- }
- Bitmap b1;
- if(scaler !=null) {
- // this is used for minithumb and crop, so we want to filter here.
- b1 = Bitmap.createBitmap(source, 0,0,
- source.getWidth(), source.getHeight(), scaler, true);
- } else{
- b1 = source;
- }
- if(recycle && b1 != source) {
- source.recycle();
- }
- intdx1 = Math.max(0, b1.getWidth() - targetWidth);
- intdy1 = Math.max(0, b1.getHeight() - targetHeight);
- Bitmap b2 = Bitmap.createBitmap(
- b1,
- dx1 / 2,
- dy1 / 2,
- targetWidth,
- targetHeight);
- if(b2 != b1) {
- if(recycle || b1 != source) {
- b1.recycle();
- }
- }
- returnb2;
- }
- /**
- * SizedThumbnailBitmap contains the bitmap, which is downsampled either from
- * the thumbnail in exif or the full image.
- * mThumbnailData, mThumbnailWidth and mThumbnailHeight are set together only if mThumbnail
- * is not null.
- *
- * The width/height of the sized bitmap may be different from mThumbnailWidth/mThumbnailHeight.
- */
- privatestaticclassSizedThumbnailBitmap {
- publicbyte[] mThumbnailData;
- publicBitmap mBitmap;
- publicintmThumbnailWidth;
- publicintmThumbnailHeight;
- }
- /**
- * Creates a bitmap by either downsampling from the thumbnail in EXIF or the full image.
- * The functions returns a SizedThumbnailBitmap,
- * which contains a downsampled bitmap and the thumbnail data in EXIF if exists.
- */
- privatestaticvoidcreateThumbnailFromEXIF(String filePath,inttargetSize,
- intmaxPixels, SizedThumbnailBitmap sizedThumbBitmap) {
- if(filePath ==null)return;
- ExifInterface exif = null;
- byte[] thumbData =null;
- try{
- exif = newExifInterface(filePath);
- if(exif !=null) {
- thumbData = exif.getThumbnail();
- }
- } catch(IOException ex) {
- Log.w(TAG, ex);
- }
- BitmapFactory.Options fullOptions = newBitmapFactory.Options();
- BitmapFactory.Options exifOptions = newBitmapFactory.Options();
- intexifThumbWidth =0;
- intfullThumbWidth =0;
- // Compute exifThumbWidth.
- if(thumbData !=null) {
- exifOptions.inJustDecodeBounds = true;
- BitmapFactory.decodeByteArray(thumbData, 0, thumbData.length, exifOptions);
- exifOptions.inSampleSize = computeSampleSize(exifOptions, targetSize, maxPixels);
- exifThumbWidth = exifOptions.outWidth / exifOptions.inSampleSize;
- }
- // Compute fullThumbWidth.
- fullOptions.inJustDecodeBounds = true;
- BitmapFactory.decodeFile(filePath, fullOptions);
- fullOptions.inSampleSize = computeSampleSize(fullOptions, targetSize, maxPixels);
- fullThumbWidth = fullOptions.outWidth / fullOptions.inSampleSize;
- // Choose the larger thumbnail as the returning sizedThumbBitmap.
- if(thumbData !=null&& exifThumbWidth >= fullThumbWidth) {
- intwidth = exifOptions.outWidth;
- intheight = exifOptions.outHeight;
- exifOptions.inJustDecodeBounds = false;
- sizedThumbBitmap.mBitmap = BitmapFactory.decodeByteArray(thumbData, 0,
- thumbData.length, exifOptions);
- if(sizedThumbBitmap.mBitmap !=null) {
- sizedThumbBitmap.mThumbnailData = thumbData;
- sizedThumbBitmap.mThumbnailWidth = width;
- sizedThumbBitmap.mThumbnailHeight = height;
- }
- } else{
- fullOptions.inJustDecodeBounds = false;
- sizedThumbBitmap.mBitmap = BitmapFactory.decodeFile(filePath, fullOptions);
- }
- }
- }
ThumbnailUtils.extractThumbnail Android图片缩略图显示总结及比较相关推荐
- Android 图片缩略图显示
//通过openRawResource获取一个inputStream对象InputStream inputStream = getResources().openRawResource(R.drawa ...
- android 图片气泡,android图片上显示气泡消息
经常需要在一个图片上面显示一个气泡,在气泡上面显示消息的数量.这里提供一种方法,直接设置textview的背景色,并且设置textview的文本信息. xmlns:tools="http:/ ...
- android 图片解码显示流程
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/jingxia2008/article/details/32327699 问题来源 android 能 ...
- android图片解码显示,android 图片解码显示流程
问题来源 android 可以在 gallery 里面显示内部存储的图片,支持 jpeg,png,gif,bmp 等,甚至文件类型和图片后缀名不一致,只要是图片文件就能显示,然后 git 只会显示第一 ...
- Android 图片黑白显示 自定义饱和度
Android 自定义显示黑白色图片 1.先下载下来需要显示的图片(或头像) 我模拟下,将图片放到assert文件夹下,拿到他的InputStream.代码如下: 1 InputStream in = ...
- android 图片百分比显示,Android编程实现等比例显示图片的方法
本文实例讲述了Android编程实现等比例显示图片的方法.分享给大家供大家参考,具体如下: 在android中,由于密度的影响,如果想得到图片的宽高是不行的,具体为什么我就大概说一下,具体的请搜索度娘 ...
- 魅族note(电信版)缩略图显示不正确问题
魅族note(电信版)缩略图显示不正确问题 [问题现象] 问题现象: 图片缩略图显示存在多处重复,展示缩略图与原本应该展示的图片不相同. 期待结果: 展示缩略图与原本应该展示的图片 ...
- wordpress搜索不了中文linux,WordPress上传带中文汉字名称的图片不显示的解决办法...
以上是WordPress上传带中文汉字名称的图片不显示的情况,正常上传成功的话,在上图两个地方都会有图片缩略图显示.相信很多WordPress装载linux系统上的朋友都会遇到这样的错误. WordP ...
- Android中读取系统图库(包含相册)中的图片,显示图片与图片的路径
最近有一个需求,是类似于手机相机的功能,拍照,多次拍照(调用系统相机只能进行一次拍照),拍照页面显示一个拍照后的缩略图,点击缩略图后进行拍过的照片的筛选(有单选和多选的问题),以及后续操作(设计相关业 ...
最新文章
- Radware LP配置步骤
- JQ之赋值方法,new的区别
- 二叉树的递归遍历(先序,中序,后序)
- python 动态编译代码,Python:在运行时动态创建函数
- 如何给数组赋值java_java怎样给数组赋值
- 计算机中的字体文件夹在哪,字体文件夹,教您怎么找字体文件夹
- windows office visio各版本下载
- 文字转换为音频mp3的方法
- BOM差异对比——Spreadsheet Compare
- (arxiv-2022)具有自适应距离对齐的时空步态特征
- 计算机桌面底边出现库如何去掉,桌面图标有蓝底怎么去掉? 去掉桌面图标阴影技巧...
- 该网页无法正常运作 HTTP ERROR 500
- 计算机硬件的共享,网心云计算机硬件共享app
- ubuntu安装discourse论坛----结合在apache服务上建立虚拟主机
- 码题集新手村600道(前300道)
- SQL的多条件查询语句
- Java项目结构及路径
- 怎么从微信群聊中引流?如何从群聊进行引流?微信群怎么引流
- 推荐系统实践(项亮)读书笔记
- matlab中的sig函数,MATLAB——sigmoid传递函数