网站系统评测要怎么做呢龙湖地产 网站建设

news/2025/9/27 2:23:33/文章来源:
网站系统评测要怎么做呢,龙湖地产 网站建设,深度科技有限公司,泉州做网站优化公司在Android中对大图片进行缩放真的很不尽如人意#xff0c;不知道是不是我的方法不对。下面我列出3种对图片缩放的方法#xff0c;并给出相应速度。请高人指教。第一种是BitmapFactory和BitmapFactory.Options。首先#xff0c;BitmapFactory.Options有几个Fields很有用…在Android中对大图片进行缩放真的很不尽如人意不知道是不是我的方法不对。下面我列出3种对图片缩放的方法并给出相应速度。请高人指教。第一种是BitmapFactory和BitmapFactory.Options。首先BitmapFactory.Options有几个Fields很有用inJustDecodeBoundsIf set to true, the decoder will return null (no bitmap), but the out...也就是说当inJustDecodeBounds设成true时bitmap并不加载到内存这样效率很高哦。而这时你可以获得bitmap的高、宽等信息。outHeightThe resulting height of the bitmap, set independent of the state of inJustDecodeBounds.outWidthThe resulting width of the bitmap, set independent of the state of inJustDecodeBounds.看到了吧上面3个变量是相关联的哦。inSampleSize If set to a value 1, requests the decoder to subsample the original p_w_picpath, returning a smaller p_w_picpath to save memory.这就是用来做缩放比的。这里有个技巧inSampleSize(outHeight/HeightoutWidth/Width)/2实践证明这样缩放出来的图片还是很好的。最后用BitmapFactory.decodeFile(path, options)生成。由于只是对bitmap加载到内存一次所以效率比较高。解析速度快。第二种是使用Bitmap加Matrix来缩放。首先要获得原bitmap再从原bitmap的基础上生成新图片。这样效率很低。第三种是用2.2新加的类ThumbnailUtils来做。让我们新看看这个类从API中来看此类就三个静态方法createVideoThumbnail、extractThumbnail(Bitmap source, int width, int height, int options)、extractThumbnail(Bitmap source, int width, int height)。我这里使用了第三个方法。再看看它的源码下面会附上。是上面我们用到的BitmapFactory.Options和Matrix等经过人家一阵加工而成。效率好像比第二种方法高一点点。下面是我的例子1. ?xml version1.0 encodingutf-8?2. 3. android:orientationvertical4. android:layout_;fill_parent5. android:layout_heightfill_parent6. 7.8. 9. android:idid/p_w_picpathShow10. android:layout_;wrap_content11. android:layout_heightwrap_content12. /13. 14. android:idid/p_w_picpath215. android:layout_;wrap_content16. android:layout_heightwrap_content17. /18. 19. android:idid/text20. android:layout_;fill_parent21. android:layout_heightwrap_content22. android:textstring/hello23. /24. 1. package com.linc.ResolvePicture;2.3. import java.io.File;4. import java.io.FileNotFoundException;5. import java.io.FileOutputStream;6. import java.io.IOException;7.8. import android.app.Activity;9. import android.graphics.Bitmap;10. import android.graphics.BitmapFactory;11. import android.graphics.Matrix;12. import android.graphics.drawable.BitmapDrawable;13. import android.graphics.drawable.Drawable;14. import android.media.ThumbnailUtils;15. import android.os.Bundle;16. import android.util.Log;17. import android.widget.ImageView;18. import android.widget.TextView;19.20. public class ResolvePicture extends Activity {21. private static String tagResolvePicture;22.     Drawable bmImg;23.     ImageView imView;24.     ImageView imView2;25.     TextView text;26.     String theTime;27. long start, stop;28. /** Called when the activity is first created. */29. Override30. public void onCreate(Bundle savedInstanceState) {31. super.onCreate(savedInstanceState);32.         setContentView(R.layout.main);33.34.         text(TextView)findViewById(R.id.text);35.36.         imView(ImageView) findViewById(R.id.p_w_picpathShow);37.         imView2(ImageView) findViewById(R.id.p_w_picpath2);38.39.         Bitmap bitmap BitmapFactory.decodeResource(getResources(),40.                 R.drawable.pic);41.42.         startSystem.currentTimeMillis();43.44. //        imView.setImageDrawable(resizeImage(bitmap, 300, 100));45.46.         imView2.setImageDrawable(resizeImage2(/sdcard/2.jpeg, 200, 100));47.48.         stopSystem.currentTimeMillis();49.50.         String theTime String.format(\n1 iterative: (%d msec),51.                 stop - start);52.53.         startSystem.currentTimeMillis();54.         imView.setImageBitmap(ThumbnailUtils.extractThumbnail(bitmap,200,100));//2.2才加进来的新类简单易用55. //        imView.setImageDrawable(resizeImage(bitmap, 30, 30));56.         stopSystem.currentTimeMillis();57.58.          theTime String.format(\n2 iterative: (%d msec),59.                 stop - start);60.61.         text.setText(theTime);62.     }63.64. //使用Bitmap加Matrix来缩放65. public static Drawable resizeImage(Bitmap bitmap, int w, int h)66.     {67.         Bitmap BitmapOrg bitmap;68. int width BitmapOrg.getWidth();69. int height BitmapOrg.getHeight();70. int newWidth w;71. int newHeight h;72.73. float scaleWidth ((float) newWidth) / width;74. float scaleHeight ((float) newHeight) / height;75.76.         Matrix matrix new Matrix();77.         matrix.postScale(scaleWidth, scaleHeight);78. // if you want to rotate the Bitmap79. // matrix.postRotate(45);80.         Bitmap resizedBitmap Bitmap.createBitmap(BitmapOrg, 0, 0, width,81.                         height, matrix, true);82. return new BitmapDrawable(resizedBitmap);83.     }84.85. //使用BitmapFactory.Options的inSampleSize参数来缩放86. public static Drawable resizeImage2(String path,87. int width,int height)88.     {89.         BitmapFactory.Options options new BitmapFactory.Options();90.         options.inJustDecodeBounds true;//不加载bitmap到内存中91.         BitmapFactory.decodeFile(path,options);92. int outWidth options.outWidth;93. int outHeight options.outHeight;94.         options.inDither false;95.         options.inPreferredConfig Bitmap.Config.ARGB_8888;96.         options.inSampleSize 1;97.98. if (outWidth ! 0 outHeight ! 0 width ! 0 height ! 0)99.         {100. int sampleSize(outWidth/widthoutHeight/height)/2;101.             Log.d(tag, sampleSize sampleSize);102.             options.inSampleSize sampleSize;103.         }104.105.         options.inJustDecodeBounds false;106. return new BitmapDrawable(BitmapFactory.decodeFile(path, options));107.     }108.109. //图片保存110. private void saveThePicture(Bitmap bitmap)111.     {112.         File filenew File(/sdcard/2.jpeg);113. try114.         {115.             FileOutputStream fosnew FileOutputStream(file);116. if(bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos))117.             {118.                 fos.flush();119.                 fos.close();120.             }121.         }122. catch(FileNotFoundException e1)123.         {124.             e1.printStackTrace();125.         }126. catch(IOException e2)127.         {128.             e2.printStackTrace();129.         }130.     }131. }ThumbnailUtils源码1. /*2.  * Copyright (C) 2009 The Android Open Source Project3.  *4.  * Licensed under the Apache License, Version 2.0 (the License);5.  * you may not use this file except in compliance with the License.6.  * You may obtain a copy of the License at7.  *8.  *      http://www.apache.org/licenses/LICENSE-2.09.  *10.  * Unless required by applicable law or agreed to in writing, software11.  * distributed under the License is distributed on an AS IS BASIS,12.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13.  * See the License for the specific language governing permissions and14.  * limitations under the License.15.  */16.17. package android.media;18.19. import android.content.ContentResolver;20. import android.content.ContentUris;21. import android.content.ContentValues;22. import android.database.Cursor;23. import android.graphics.Bitmap;24. import android.graphics.BitmapFactory;25. import android.graphics.Canvas;26. import android.graphics.Matrix;27. import android.graphics.Rect;28. import android.media.MediaMetadataRetriever;29. import android.media.MediaFile.MediaFileType;30. import android.net.Uri;31. import android.os.ParcelFileDescriptor;32. import android.provider.BaseColumns;33. import android.provider.MediaStore.Images;34. import android.provider.MediaStore.Images.Thumbnails;35. import android.util.Log;36.37. import java.io.FileInputStream;38. import java.io.FileDescriptor;39. import java.io.IOException;40. import java.io.OutputStream;41.42. /**43.  * Thumbnail generation routines for media provider.44.  */45.46. public class ThumbnailUtils {47. private static final String TAG ThumbnailUtils;48.49. /* Maximum pixels size for created bitmap. */50. private static final int MAX_NUM_PIXELS_THUMBNAIL 512 * 384;51. private static final int MAX_NUM_PIXELS_MICRO_THUMBNAIL 128 * 128;52. private static final int UNCONSTRAINED -1;53.54. /* Options used internally. */55. private static final int OPTIONS_NONE 0x0;56. private static final int OPTIONS_SCALE_UP 0x1;57.58. /**59.      * Constant used to indicate we should recycle the input in60.      * {link #extractThumbnail(Bitmap, int, int, int)} unless the output is the input.61.      */62. public static final int OPTIONS_RECYCLE_INPUT 0x2;63.64. /**65.      * Constant used to indicate the dimension of mini thumbnail.66.      * hide Only used by media framework and media provider internally.67.      */68. public static final int TARGET_SIZE_MINI_THUMBNAIL 320;69.70. /**71.      * Constant used to indicate the dimension of micro thumbnail.72.      * hide Only used by media framework and media provider internally.73.      */74. public static final int TARGET_SIZE_MICRO_THUMBNAIL 96;75.76. /**77.      * This method first examines if the thumbnail embedded in EXIF is bigger than our target78.      * size. If not, then itll create a thumbnail from original p_w_picpath. Due to efficiency79.      * consideration, we want to let MediaThumbRequest avoid calling this method twice for80.      * both kinds, so it only requests for MICRO_KIND and set saveImage to true.81.      *82.      * This method always returns a square thumbnail for MICRO_KIND thumbnail.83.      *84.      * param filePath the path of p_w_picpath file85.      * param kind could be MINI_KIND or MICRO_KIND86.      * return Bitmap87.      *88.      * hide This method is only used by media framework and media provider internally.89.      */90. public static Bitmap createImageThumbnail(String filePath, int kind) {91. boolean wantMini (kind Images.Thumbnails.MINI_KIND);92. int targetSize wantMini93.                 ? TARGET_SIZE_MINI_THUMBNAIL94.                 : TARGET_SIZE_MICRO_THUMBNAIL;95. int maxPixels wantMini96.                 ? MAX_NUM_PIXELS_THUMBNAIL97.                 : MAX_NUM_PIXELS_MICRO_THUMBNAIL;98.         SizedThumbnailBitmap sizedThumbnailBitmap new SizedThumbnailBitmap();99.         Bitmap bitmap null;100.         MediaFileType fileType MediaFile.getFileType(filePath);101. if (fileType ! null fileType.fileType MediaFile.FILE_TYPE_JPEG) {102.             createThumbnailFromEXIF(filePath, targetSize, maxPixels, sizedThumbnailBitmap);103.             bitmap sizedThumbnailBitmap.mBitmap;104.         }105.106. if (bitmap null) {107. try {108.                 FileDescriptor fd new FileInputStream(filePath).getFD();109.                 BitmapFactory.Options options new BitmapFactory.Options();110.                 options.inSampleSize 1;111.                 options.inJustDecodeBounds true;112.                 BitmapFactory.decodeFileDescriptor(fd, null, options);113. if (options.mCancel || options.outWidth -1114.                         || options.outHeight -1) {115. return null;116.                 }117.                 options.inSampleSize computeSampleSize(118.                         options, targetSize, maxPixels);119.                 options.inJustDecodeBounds false;120.121.                 options.inDither false;122.                 options.inPreferredConfig Bitmap.Config.ARGB_8888;123.                 bitmap BitmapFactory.decodeFileDescriptor(fd, null, options);124.             } catch (IOException ex) {125.                 Log.e(TAG, , ex);126.             }127.         }128.129. if (kind Images.Thumbnails.MICRO_KIND) {130. // now we make it a square thumbnail for MICRO_KIND thumbnail131.             bitmap extractThumbnail(bitmap,132.                     TARGET_SIZE_MICRO_THUMBNAIL,133.                     TARGET_SIZE_MICRO_THUMBNAIL, OPTIONS_RECYCLE_INPUT);134.         }135. return bitmap;136.     }137.138. /**139.      * Create a video thumbnail for a video. May return null if the video is140.      * corrupt or the format is not supported.141.      *142.      * param filePath the path of video file143.      * param kind could be MINI_KIND or MICRO_KIND144.      */145. public static Bitmap createVideoThumbnail(String filePath, int kind) {146.         Bitmap bitmap null;147.         MediaMetadataRetriever retriever new MediaMetadataRetriever();148. try {149.             retriever.setMode(MediaMetadataRetriever.MODE_CAPTURE_FRAME_ONLY);150.             retriever.setDataSource(filePath);151.             bitmap retriever.captureFrame();152.         } catch (IllegalArgumentException ex) {153. // Assume this is a corrupt video file154.         } catch (RuntimeException ex) {155. // Assume this is a corrupt video file.156.         } finally {157. try {158.                 retriever.release();159.             } catch (RuntimeException ex) {160. // Ignore failures while cleaning up.161.             }162.         }163. if (kind Images.Thumbnails.MICRO_KIND bitmap ! null) {164.             bitmap extractThumbnail(bitmap,165.                     TARGET_SIZE_MICRO_THUMBNAIL,166.                     TARGET_SIZE_MICRO_THUMBNAIL,167.                     OPTIONS_RECYCLE_INPUT);168.         }169. return bitmap;170.     }171.172. /**173.      * Creates a centered bitmap of the desired size.174.      *175.      * param source original bitmap source176.      * param width targeted width177.      * param height targeted height178.      */179. public static Bitmap extractThumbnail(180.             Bitmap source, int width, int height) {181. return extractThumbnail(source, width, height, OPTIONS_NONE);182.     }183.184. /**185.      * Creates a centered bitmap of the desired size.186.      *187.      * param source original bitmap source188.      * param width targeted width189.      * param height targeted height190.      * param options options used during thumbnail extraction191.      */192. public static Bitmap extractThumbnail(193.             Bitmap source, int width, int height, int options) {194. if (source null) {195. return null;196.         }197.198. float scale;199. if (source.getWidth() source.getHeight()) {200.             scale width / (float) source.getWidth();201.         } else {202.             scale height / (float) source.getHeight();203.         }204.         Matrix matrix new Matrix();205.         matrix.setScale(scale, scale);206.         Bitmap thumbnail transform(matrix, source, width, height,207.                 OPTIONS_SCALE_UP | options);208. return thumbnail;209.     }210.211. /*212.      * Compute the sample size as a function of minSideLength213.      * and maxNumOfPixels.214.      * minSideLength is used to specify that minimal width or height of a215.      * bitmap.216.      * maxNumOfPixels is used to specify the maximal size in pixels that is217.      * tolerable in terms of memory usage.218.      *219.      * The function returns a sample size based on the constraints.220.      * Both size and minSideLength can be passed in as IImage.UNCONSTRAINED,221.      * which indicates no care of the corresponding constraint.222.      * The functions prefers returning a sample size that223.      * generates a smaller bitmap, unless minSideLength IImage.UNCONSTRAINED.224.      *225.      * Also, the function rounds up the sample size to a power of 2 or multiple226.      * of 8 because BitmapFactory only honors sample size this way.227.      * For example, BitmapFactory downsamples an p_w_picpath by 2 even though the228.      * request is 3. So we round up the sample size to avoid OOM.229.      */230. private static int computeSampleSize(BitmapFactory.Options options,231. int minSideLength, int maxNumOfPixels) {232. int initialSize computeInitialSampleSize(options, minSideLength,233.                 maxNumOfPixels);234.235. int roundedSize;236. if (initialSize 8 ) {237.             roundedSize 1;238. while (roundedSize initialSize) {239.                 roundedSize 1;240.             }241.         } else {242.             roundedSize (initialSize 7) / 8 * 8;243.         }244.245. return roundedSize;246.     }247.248. private static int computeInitialSampleSize(BitmapFactory.Options options,249. int minSideLength, int maxNumOfPixels) {250. double w options.outWidth;251. double h options.outHeight;252.253. int lowerBound (maxNumOfPixels UNCONSTRAINED) ? 1 :254.                 (int) Math.ceil(Math.sqrt(w * h / maxNumOfPixels));255. int upperBound (minSideLength UNCONSTRAINED) ? 128 :256.                 (int) Math.min(Math.floor(w / minSideLength),257.                 Math.floor(h / minSideLength));258.259. if (upperBound lowerBound) {260. // return the larger one when there is no overlapping zone.261. return lowerBound;262.         }263.264. if ((maxNumOfPixels UNCONSTRAINED) 265.                 (minSideLength UNCONSTRAINED)) {266. return 1;267.         } else if (minSideLength UNCONSTRAINED) {268. return lowerBound;269.         } else {270. return upperBound;271.         }272.     }273.274. /**275.      * Make a bitmap from a given Uri, minimal side length, and maximum number of pixels.276.      * The p_w_picpath data will be read from specified pfd if its not null, otherwise277.      * a new input stream will be created using specified ContentResolver.278.      *279.      * Clients are allowed to pass their own BitmapFactory.Options used for bitmap decoding. A280.      * new BitmapFactory.Options will be created if options is null.281.      */282. private static Bitmap makeBitmap(int minSideLength, int maxNumOfPixels,283.             Uri uri, ContentResolver cr, ParcelFileDescriptor pfd,284.             BitmapFactory.Options options) {285.             Bitmap b null;286. try {287. if (pfd null) pfd makeInputStream(uri, cr);288. if (pfd null) return null;289. if (options null) options new BitmapFactory.Options();290.291.             FileDescriptor fd pfd.getFileDescriptor();292.             options.inSampleSize 1;293.             options.inJustDecodeBounds true;294.             BitmapFactory.decodeFileDescriptor(fd, null, options);295. if (options.mCancel || options.outWidth -1296.                     || options.outHeight -1) {297. return null;298.             }299.             options.inSampleSize computeSampleSize(300.                     options, minSideLength, maxNumOfPixels);301.             options.inJustDecodeBounds false;302.303.             options.inDither false;304.             options.inPreferredConfig Bitmap.Config.ARGB_8888;305.             b BitmapFactory.decodeFileDescriptor(fd, null, options);306.         } catch (OutOfMemoryError ex) {307.             Log.e(TAG, Got oom exception , ex);308. return null;309.         } finally {310.             closeSilently(pfd);311.         }312. return b;313.     }314.315. private static void closeSilently(ParcelFileDescriptor c) {316. if (c null) return;317. try {318.           c.close();319.       } catch (Throwable t) {320. // do nothing321.       }322.     }323.324. private static ParcelFileDescriptor makeInputStream(325.             Uri uri, ContentResolver cr) {326. try {327. return cr.openFileDescriptor(uri, r);328.         } catch (IOException ex) {329. return null;330.         }331.     }332.333. /**334.      * Transform source Bitmap to targeted width and height.335.      */336. private static Bitmap transform(Matrix scaler,337.             Bitmap source,338. int targetWidth,339. int targetHeight,340. int options) {341. boolean scaleUp (options OPTIONS_SCALE_UP) ! 0;342. boolean recycle (options OPTIONS_RECYCLE_INPUT) ! 0;343.344. int deltaX source.getWidth() - targetWidth;345. int deltaY source.getHeight() - targetHeight;346. if (!scaleUp (deltaX 0 || deltaY 0)) {347. /*348.             * In this case the bitmap is smaller, at least in one dimension,349.             * than the target.  Transform it by placing as much of the p_w_picpath350.             * as possible into the target and leaving the top/bottom or351.             * left/right (or both) black.352.             */353.             Bitmap b2 Bitmap.createBitmap(targetWidth, targetHeight,354.             Bitmap.Config.ARGB_8888);355.             Canvas c new Canvas(b2);356.357. int deltaXHalf Math.max(0, deltaX / 2);358. int deltaYHalf Math.max(0, deltaY / 2);359.             Rect src new Rect(360.             deltaXHalf,361.             deltaYHalf,362.             deltaXHalf Math.min(targetWidth, source.getWidth()),363.             deltaYHalf Math.min(targetHeight, source.getHeight()));364. int dstX (targetWidth  - src.width())  / 2;365. int dstY (targetHeight - src.height()) / 2;366.             Rect dst new Rect(367.                     dstX,368.                     dstY,369.                     targetWidth - dstX,370.                     targetHeight - dstY);371.             c.drawBitmap(source, src, dst, null);372. if (recycle) {373.                 source.recycle();374.             }375. return b2;376.         }377. float bitmapWidthF source.getWidth();378. float bitmapHeightF source.getHeight();379.380. float bitmapAspect bitmapWidthF / bitmapHeightF;381. float viewAspect   (float) targetWidth / targetHeight;382.383. if (bitmapAspect viewAspect) {384. float scale targetHeight / bitmapHeightF;385. if (scale .9F || scale 1F) {386.                 scaler.setScale(scale, scale);387.             } else {388.                 scaler null;389.             }390.         } else {391. float scale targetWidth / bitmapWidthF;392. if (scale .9F || scale 1F) {393.                 scaler.setScale(scale, scale);394.             } else {395.                 scaler null;396.             }397.         }398.399.         Bitmap b1;400. if (scaler ! null) {401. // this is used for minithumb and crop, so we want to filter here.402.             b1 Bitmap.createBitmap(source, 0, 0,403.             source.getWidth(), source.getHeight(), scaler, true);404.         } else {405.             b1 source;406.         }407.408. if (recycle b1 ! source) {409.             source.recycle();410.         }411.412. int dx1 Math.max(0, b1.getWidth() - targetWidth);413. int dy1 Math.max(0, b1.getHeight() - targetHeight);414.415.         Bitmap b2 Bitmap.createBitmap(416.                 b1,417.                 dx1 / 2,418.                 dy1 / 2,419.                 targetWidth,420.                 targetHeight);421.422. if (b2 ! b1) {423. if (recycle || b1 ! source) {424.                 b1.recycle();425.             }426.         }427.428. return b2;429.     }430.431. /**432.      * SizedThumbnailBitmap contains the bitmap, which is downsampled either from433.      * the thumbnail in exif or the full p_w_picpath.434.      * mThumbnailData, mThumbnailWidth and mThumbnailHeight are set together only if mThumbnail435.      * is not null.436.      *437.      * The width/height of the sized bitmap may be different from mThumbnailWidth/mThumbnailHeight.438.      */439. private static class SizedThumbnailBitmap {440. public byte[] mThumbnailData;441. public Bitmap mBitmap;442. public int mThumbnailWidth;443. public int mThumbnailHeight;444.     }445.446. /**447.      * Creates a bitmap by either downsampling from the thumbnail in EXIF or the full p_w_picpath.448.      * The functions returns a SizedThumbnailBitmap,449.      * which contains a downsampled bitmap and the thumbnail data in EXIF if exists.450.      */451. private static void createThumbnailFromEXIF(String filePath, int targetSize,452. int maxPixels, SizedThumbnailBitmap sizedThumbBitmap) {453. if (filePath null) return;454.455.         ExifInterface exif null;456. byte [] thumbData null;457. try {458.             exif new ExifInterface(filePath);459. if (exif ! null) {460.                 thumbData exif.getThumbnail();461.             }462.         } catch (IOException ex) {463.             Log.w(TAG, ex);464.         }465.466.         BitmapFactory.Options fullOptions new BitmapFactory.Options();467.         BitmapFactory.Options exifOptions new BitmapFactory.Options();468. int exifThumbWidth 0;469. int fullThumbWidth 0;470.471. // Compute exifThumbWidth.472. if (thumbData ! null) {473.             exifOptions.inJustDecodeBounds true;474.             BitmapFactory.decodeByteArray(thumbData, 0, thumbData.length, exifOptions);475.             exifOptions.inSampleSize computeSampleSize(exifOptions, targetSize, maxPixels);476.             exifThumbWidth exifOptions.outWidth / exifOptions.inSampleSize;477.         }478.479. // Compute fullThumbWidth.480.         fullOptions.inJustDecodeBounds true;481.         BitmapFactory.decodeFile(filePath, fullOptions);482.         fullOptions.inSampleSize computeSampleSize(fullOptions, targetSize, maxPixels);483.         fullThumbWidth fullOptions.outWidth / fullOptions.inSampleSize;484.485. // Choose the larger thumbnail as the returning sizedThumbBitmap.486. if (thumbData ! null exifThumbWidth fullThumbWidth) {487. int width exifOptions.outWidth;488. int height exifOptions.outHeight;489.             exifOptions.inJustDecodeBounds false;490.             sizedThumbBitmap.mBitmap BitmapFactory.decodeByteArray(thumbData, 0,491.                     thumbData.length, exifOptions);492. if (sizedThumbBitmap.mBitmap ! null) {493.                 sizedThumbBitmap.mThumbnailData thumbData;494.                 sizedThumbBitmap.mThumbnailWidth width;495.                 sizedThumbBitmap.mThumbnailHeight height;496.             }497.         } else {498.             fullOptions.inJustDecodeBounds false;499.             sizedThumbBitmap.mBitmap BitmapFactory.decodeFile(filePath, fullOptions);500.         }501.     }502. }

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/919017.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

小企业怎么做网站数据分析网站

大家多多支持原文!以下内容多为网络搜集,非商业用途。版权归原作者所有,侵联!BG文《我在逃生游戏里养娃娃》作者:鹤舫闲人《岁月缱绻已无你》作者:酒爷《关于我比女主苏这回事》作者:欢何极《消…

丹阳翼网首页合肥优化

潍坊学院教育技术学专业怎么样?有知道的麻烦说下,谢谢!以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!潍坊学院教育技术学专业怎么样?有知道的…

ios andriod 位置信息

ios andriod 位置信息ios 提示: (没有永久拒绝 ) deniedForever 允许一次 whileInUse ( 1下次启动:需要重新请求权限 。临时授权,应用退出后权限自动撤销) 使用App时…

Obsidia Git同步方法(偏安卓)

本人目前只有安卓和Windows端设备,所以其他版本(如ios,macos等)可能不适用。 首先不管是安卓还是Windows,都必须先安装Obsidia本体,git(安卓可以在google play内搜索Git Sync),然后根据对应的教程登录github(…

关于建设网站的合作合同范本网站怎么推广运营

目录 一、什么是WSGI1.1 WSGI接口的组成部分1.2 关于environ 二、简易的web框架实现2.1 文件结构2.2 在web/my_web.py定义动态响应内容2.3 在html/index.html中定义静态页面内容2.4 在web_server.py中实现web服务器框架2.5 测试 三、让简易的web框架动态请求支持多页面3.1 修改…

可以充值的网站怎么建设微信如何开发自己的小程序

阿里云2核4G服务器多少钱一年?2核4G服务器1个月费用多少?2核4G服务器30元3个月、85元一年,轻量应用服务器2核4G4M带宽165元一年,企业用户2核4G5M带宽199元一年。本文阿里云服务器网整理的2核4G参加活动的主机是ECS经济型e实例和u1…

如何用h5做网站企业app开发制作

背景 拍摄APP项目上线有一阵了,每天的拍摄数据呈现波动上升状态、业务方需要对数据进行加工,如果能有对未来的数据量的预测就好了 。 目标 在端侧展示拍摄数据可视化趋势图等、并能推断数据(选择预测日期) 简单实现个demo gif背…

小说网站开发背景中铁建设集团招聘700人

从 Java Agent 报错开始,到 JVM 原理,到 glibc 线程安全,再到 pthread tls,逐步探究 Java Agent 诡异报错。 背景 由于阿里云多个产品都提供了 Java Agent 给用户使用,在多个 Java Agent 一起使用的场景下&#xff0…

网站建设linuxwordpress免费插件分享

一、概述 SortedList 类代表了一系列按照键来排序的键/值对,这些键值对可以通过键和索引来访问。排序列表是数组和哈希表的组合。它包含一个可使用键或索引访问各项的列表。 如果您使用索引访问各项,则它是一个动态数组(ArrayList&#xff0…

深圳东莞网站建设wordpress外网跳转

在网页抓取方面,可以使用 Python、Java 等编程语言编写程序,通过模拟 HTTP 请求,获取淘宝多网站上的商品页面。在数据提取方面,可以使用正则表达式、XPath 等方式从 HTML 代码中提取出有用的信息。值得注意的是,淘宝网…

php网站模板制作软件河北建设厅安监站官方网站

一、条件语句 条件语句基于不同的条件来执行不同的动作 1.if语句:只有当指定条件为true时,使用该语句来执行代码 2.if...else语句:当条件为true时执行代码,当条件为else时执行其他代码 3.if...else if...else语句:…

网站公司做文员网站建设需要学的

4种kill某个用户所有进程的方法 在linux系统管理中,我们有时候需要kill掉某个用户的所有进程,初学者一般先查询出用户的所有pid,然后一条条kill掉,或者写好一个脚本,实际上方法都有现成的,这边有4种方法&am…

新网站多久收录网站有些什么内容

文章目录 仲裁队列1、创建交换机2、创建仲裁队列3、验证主节点宕机不影响消息发送和接收 流式队列(不推荐,Kafka主场)概念 异地容灾一、Federation插件概述 二、Federation交换机1、总体说明2、准备工作3、启用联邦插件4、添加上游连接端点5、…

爱站网使用体验wordpress页脚二维码

💢欢迎来到张胤尘的开源技术站 💥开源如江河,汇聚众志成。代码似星辰,照亮行征程。开源精神长,传承永不忘。携手共前行,未来更辉煌💥 文章目录 通道通道声明初始化缓冲机制无缓冲通道代码示例 带…

做个网站app吗南昌网站建设基本流程

2020/11/3操作记录搭建好Python的数据环境之后,接下来就是在Python代码中访问数据库我先在Navicat图形化界面创建一个数据库命名为pythontest,再在数据库中创建了一个表studentinfo有nid,nname,ngrade,nage四个字段,nid为主键递增。通过查询编…

wordpress国外主题网站wordpress的数据库名

作者主页:源码空间codegym 简介:Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 项目介绍 管理员:首页、个人中心、公告信息管理、班级管理、学生管理、教师管理、课程类型管理、课程信息管理、学生选课管理、作业布置管理…

合肥网站关键词张槎手机网站建设

今天天气很好,早上看了肺炎的病情如下图这个是丁香医生的统计数据,腾讯也出了一份统计数据,截止到写这篇文章的时候,已经确诊人数为 7766 人,但是我觉得丁香医生里面的截图内容比较多,也没有一些诱导二维码…

集团门户网站建设公司无锡seo关键词排名

文章目录 前言1.安装erlang 语言2.安装rabbitMQ3. 内网穿透3.1 安装cpolar内网穿透(支持一键自动安装脚本)3.2 创建HTTP隧道 4. 公网远程连接5.固定公网TCP地址5.1 保留一个固定的公网TCP端口地址5.2 配置固定公网TCP端口地址 前言 RabbitMQ是一个在 AMQP(高级消息队列协议)基…

网站备案现场浏览器官网入口

目录 一、前言:误差与拟合 (一)经验误差 (二)过拟合、欠拟合 二、评估方法 (一)评估总体的思路 (二)如何划分训练集和测试集 1.留出法 2.k折交叉验证 3.自助法 …

个人网站变现如何查网站是哪家公司做的

任务:将asterisk1.8.24.0移植到rt5350上面 交叉工具链:mipsel-linux(3.4.2) 1. 配置asterisk,执行./configure --hostmipsel-linux 找不到termcap和libxml2,分别对他们交叉编译,然后将生成的库拷贝到交叉工具链的lib…