图片处理

LVDT/RVDT(线性/旋转可变差动变压器)、Resolver(旋转变压器)仿真方案 今天虹科带大家一起走进LVDT/RVDT以及Resolver的仿真方案,产品产品覆盖更多应用。需要更多交流欢迎联系ltt@hkaco.com。 目录 一、关于LVDT 二、关于RVDT 三、关于Resolver 四、仿真方案 五、主要技术指标: 六、新品亮点: 七、产品经理说: 八、产品应用: 一、关于LVDT 线性可变差动变压器(LVDT)是用于测量线性位移的电气变压传感器。LVDT由交流激励源驱动,产生一对交流输出信号,该信号根据磁芯的机械位置(位移)进行调制。LVDT... 阅读详情

将一个图片切割成多个图片 
有种场景,我们想将一个图片切割成多个图片。比如我们在开发一个拼图的游戏,就首先要对图片进行切割。 
以下是封装好的两个类,可以实现图片的切割。仅供参考和学习。 
一个是ImagePiece类,此类保存了一个Bitmap对象和一个标识图片的顺序索引的int变量。 

Java代码   收藏代码
  1. import android.graphics.Bitmap;   
  2. public class ImagePiece {     
  3.     public int index = 0;          
  4.     public Bitmap bitmap = null;    
  5. }  


一个是ImageSplitter类,有一个静态方法split,传入的参数是要切割的Bitmap对象,和横向和竖向的切割片数。比如传入的是3、3,则横竖向都切割成3片,最终会将整个图片切割成3X3=9片。 

Java代码   收藏代码
  1. import java.util.ArrayList;    
  2. import java.util.List;    
  3.     
  4. import android.graphics.Bitmap;    
  5.     
  6. public class ImageSplitter {    
  7.     
  8.     public static List<ImagePiece> split(Bitmap bitmap, int xPiece, int yPiece) {    
  9.     
  10.         List<ImagePiece> pieces = new ArrayList<ImagePiece>(xPiece * yPiece);    
  11.         int width = bitmap.getWidth();    
  12.         int height = bitmap.getHeight();    
  13.         int pieceWidth = width / 3;    
  14.         int pieceHeight = height / 3;    
  15.         for (int i = 0; i < yPiece; i++) {    
  16.             for (int j = 0; j < xPiece; j++) {    
  17.                 ImagePiece piece = new ImagePiece();    
  18.                 piece.index = j + i * xPiece;    
  19.                 int xValue = j * pieceWidth;    
  20.                 int yValue = i * pieceHeight;    
  21.                 piece.bitmap = Bitmap.createBitmap(bitmap, xValue, yValue,    
  22.                         pieceWidth, pieceHeight);    
  23.                 pieces.add(piece);    
  24.             }    
  25.         }    
  26.     
  27.         return pieces;    
  28.     }    
  29.     
  30. }  



1、图标加灰色过滤; 
2、android的图片资源默认是静态的,单实例;如果两个IM好友的头像一样,最简单的都是用的软件自带头像,有一个在线,一个离线,直接改变头像的灰度,则两个用户的头像都会变灰或者在线,答案是:Drawable.mutate()。 

Java代码   收藏代码
  1. Drawable mDrawable = context.getResources().getDrawable(R.drawable.face_icon);    
  2. //Make this drawable mutable.    
  3. //A mutable drawable is guaranteed to not share its state with any other drawable.    
  4. mDrawable.mutate();    
  5. ColorMatrix cm = new ColorMatrix();    
  6. cm.setSaturation(0);    
  7. ColorMatrixColorFilter cf = new ColorMatrixColorFilter(cm);    
  8. mDrawable.setColorFilter(cf);  



生成缩略图,抠自android launcher源码: 

Java代码   收藏代码
  1. /* 
  2.  * Copyright (C) 2008 The Android Open Source Project 
  3.  * 
  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 at 
  7.  * 
  8.  *      http://www.apache.org/licenses/LICENSE-2.0 
  9.  * 
  10.  * Unless required by applicable law or agreed to in writing, software 
  11.  * 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 and 
  14.  * limitations under the License. 
  15.  */  
  16.   
  17. package com.android.launcher;  
  18.   
  19. import android.graphics.drawable.BitmapDrawable;  
  20. import android.graphics.drawable.Drawable;  
  21. import android.graphics.drawable.PaintDrawable;  
  22. import android.graphics.Bitmap;  
  23. import android.graphics.PixelFormat;  
  24. import android.graphics.Canvas;  
  25. import android.graphics.PaintFlagsDrawFilter;  
  26. import android.graphics.Paint;  
  27. import android.graphics.Rect;  
  28. import android.content.res.Resources;  
  29. import android.content.Context;  
  30.   
  31. /** 
  32.  * Various utilities shared amongst the Launcher's classes. 
  33.  */  
  34. final class Utilities {  
  35.     private static int sIconWidth = -1;  
  36.     private static int sIconHeight = -1;  
  37.   
  38.     private static final Paint sPaint = new Paint();  
  39.     private static final Rect sBounds = new Rect();  
  40.     private static final Rect sOldBounds = new Rect();  
  41.     private static Canvas sCanvas = new Canvas();  
  42.   
  43.     static {  
  44.         sCanvas.setDrawFilter(new PaintFlagsDrawFilter(Paint.DITHER_FLAG,  
  45.                 Paint.FILTER_BITMAP_FLAG));  
  46.     }  
  47.   
  48.     /** 
  49.      * Returns a Drawable representing the thumbnail of the specified Drawable. 
  50.      * The size of the thumbnail is defined by the dimension 
  51.      * android.R.dimen.launcher_application_icon_size. 
  52.      * 
  53.      * This method is not thread-safe and should be invoked on the UI thread only. 
  54.      * 
  55.      * @param icon The icon to get a thumbnail of. 
  56.      * @param context The application's context. 
  57.      * 
  58.      * @return A thumbnail for the specified icon or the icon itself if the 
  59.      *         thumbnail could not be created.  
  60.      */  
  61.     static Drawable createIconThumbnail(Drawable icon, Context context) {  
  62.         if (sIconWidth == -1) {  
  63.             final Resources resources = context.getResources();  
  64.             sIconWidth = sIconHeight = (int) resources.getDimension(android.R.dimen.app_icon_size);  
  65.         }  
  66.   
  67.         int width = sIconWidth;  
  68.         int height = sIconHeight;  
  69.   
  70.         float scale = 1.0f;  
  71.         if (icon instanceof PaintDrawable) {  
  72.             PaintDrawable painter = (PaintDrawable) icon;  
  73.             painter.setIntrinsicWidth(width);  
  74.             painter.setIntrinsicHeight(height);  
  75.         } else if (icon instanceof BitmapDrawable) {  
  76.             // Ensure the bitmap has a density.  
  77.             BitmapDrawable bitmapDrawable = (BitmapDrawable) icon;  
  78.             Bitmap bitmap = bitmapDrawable.getBitmap();  
  79.             if (bitmap.getDensity() == Bitmap.DENSITY_NONE) {  
  80.                 bitmapDrawable.setTargetDensity(context.getResources().getDisplayMetrics());  
  81.             }  
  82.         }  
  83.         int iconWidth = icon.getIntrinsicWidth();  
  84.         int iconHeight = icon.getIntrinsicHeight();  
  85.   
  86.         if (width > 0 && height > 0) {  
  87.             if (width < iconWidth || height < iconHeight || scale != 1.0f) {  
  88.                 final float ratio = (float) iconWidth / iconHeight;  
  89.   
  90.                 if (iconWidth > iconHeight) {  
  91.                     height = (int) (width / ratio);  
  92.                 } else if (iconHeight > iconWidth) {  
  93.                     width = (int) (height * ratio);  
  94.                 }  
  95.   
  96.                 final Bitmap.Config c = icon.getOpacity() != PixelFormat.OPAQUE ?  
  97.                             Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565;  
  98.                 final Bitmap thumb = Bitmap.createBitmap(sIconWidth, sIconHeight, c);  
  99.                 final Canvas canvas = sCanvas;  
  100.                 canvas.setBitmap(thumb);  
  101.                 // Copy the old bounds to restore them later  
  102.                 // If we were to do oldBounds = icon.getBounds(),  
  103.                 // the call to setBounds() that follows would  
  104.                 // change the same instance and we would lose the  
  105.                 // old bounds  
  106.                 sOldBounds.set(icon.getBounds());  
  107.                 final int x = (sIconWidth - width) / 2;  
  108.                 final int y = (sIconHeight - height) / 2;  
  109.                 icon.setBounds(x, y, x + width, y + height);  
  110.                 icon.draw(canvas);  
  111.                 icon.setBounds(sOldBounds);  
  112.                 icon = new FastBitmapDrawable(thumb);  
  113.             } else if (iconWidth < width && iconHeight < height) {  
  114.                 final Bitmap.Config c = Bitmap.Config.ARGB_8888;  
  115.                 final Bitmap thumb = Bitmap.createBitmap(sIconWidth, sIconHeight, c);  
  116.                 final Canvas canvas = sCanvas;  
  117.                 canvas.setBitmap(thumb);  
  118.                 sOldBounds.set(icon.getBounds());  
  119.                 final int x = (width - iconWidth) / 2;  
  120.                 final int y = (height - iconHeight) / 2;  
  121.                 icon.setBounds(x, y, x + iconWidth, y + iconHeight);  
  122.                 icon.draw(canvas);  
  123.                 icon.setBounds(sOldBounds);  
  124.                 icon = new FastBitmapDrawable(thumb);  
  125.             }  
  126.         }  
  127.   
  128.         return icon;  
  129.     }  
  130.   
  131.     /** 
  132.      * Returns a Bitmap representing the thumbnail of the specified Bitmap. 
  133.      * The size of the thumbnail is defined by the dimension 
  134.      * android.R.dimen.launcher_application_icon_size. 
  135.      * 
  136.      * This method is not thread-safe and should be invoked on the UI thread only. 
  137.      * 
  138.      * @param bitmap The bitmap to get a thumbnail of. 
  139.      * @param context The application's context. 
  140.      * 
  141.      * @return A thumbnail for the specified bitmap or the bitmap itself if the 
  142.      *         thumbnail could not be created. 
  143.      */  
  144.     static Bitmap createBitmapThumbnail(Bitmap bitmap, Context context) {  
  145.         if (sIconWidth == -1) {  
  146.             final Resources resources = context.getResources();  
  147.             sIconWidth = sIconHeight = (int) resources.getDimension(  
  148.                     android.R.dimen.app_icon_size);  
  149.         }  
  150.   
  151.         int width = sIconWidth;  
  152.         int height = sIconHeight;  
  153.   
  154.         final int bitmapWidth = bitmap.getWidth();  
  155.         final int bitmapHeight = bitmap.getHeight();  
  156.   
  157.         if (width > 0 && height > 0) {  
  158.             if (width < bitmapWidth || height < bitmapHeight) {  
  159.                 final float ratio = (float) bitmapWidth / bitmapHeight;  
  160.       
  161.                 if (bitmapWidth > bitmapHeight) {  
  162.                     height = (int) (width / ratio);  
  163.                 } else if (bitmapHeight > bitmapWidth) {  
  164.                     width = (int) (height * ratio);  
  165.                 }  
  166.       
  167.                 final Bitmap.Config c = (width == sIconWidth && height == sIconHeight) ?  
  168.                         bitmap.getConfig() : Bitmap.Config.ARGB_8888;  
  169.                 final Bitmap thumb = Bitmap.createBitmap(sIconWidth, sIconHeight, c);  
  170.                 final Canvas canvas = sCanvas;  
  171.                 final Paint paint = sPaint;  
  172.                 canvas.setBitmap(thumb);  
  173.                 paint.setDither(false);  
  174.                 paint.setFilterBitmap(true);  
  175.                 sBounds.set((sIconWidth - width) / 2, (sIconHeight - height) / 2, width, height);  
  176.                 sOldBounds.set(0, 0, bitmapWidth, bitmapHeight);  
  177.                 canvas.drawBitmap(bitmap, sOldBounds, sBounds, paint);  
  178.                 return thumb;  
  179.             } else if (bitmapWidth < width || bitmapHeight < height) {  
  180.                 final Bitmap.Config c = Bitmap.Config.ARGB_8888;  
  181.                 final Bitmap thumb = Bitmap.createBitmap(sIconWidth, sIconHeight, c);  
  182.                 final Canvas canvas = sCanvas;  
  183.                 final Paint paint = sPaint;  
  184.                 canvas.setBitmap(thumb);  
  185.                 paint.setDither(false);  
  186.                 paint.setFilterBitmap(true);  
  187.                 canvas.drawBitmap(bitmap, (sIconWidth - bitmapWidth) / 2,  
  188.                         (sIconHeight - bitmapHeight) / 2, paint);  
  189.                 return thumb;  
  190.             }  
  191.         }  
  192.   
  193.         return bitmap;  
  194.     }  
  195. }  



Java代码   收藏代码
  1. //Android Matrix类实现镜像方法  
  2. public void drawRegion(Image image_src,  
  3.   
  4. int x_src, int y_src,  
  5.   
  6. int width, int height,  
  7.   
  8. int transform,  
  9.   
  10. int x_dest, int y_dest,  
  11.   
  12. int anchor){  
  13.   
  14. if((anchor&VCENTER) != 0){  
  15.   
  16. y_dest -= height/2;  
  17.   
  18. }else if((anchor&BOTTOM) != 0){  
  19.   
  20. y_dest -= height;  
  21.   
  22. }  
  23.   
  24. if((anchor&RIGHT) != 0){  
  25.   
  26. x_dest -= width;  
  27.   
  28. }else if((anchor&HCENTER) != 0){  
  29.   
  30. x_dest -= width/2;  
  31.   
  32. }  
  33.   
  34. Bitmap newMap = Bitmap.createBitmap(image_src.getBitmap(), x_src, y_src, width, height);  
  35.   
  36. Matrix mMatrix = new Matrix();  
  37.   
  38. Matrix temp = new Matrix();  
  39.   
  40. Matrix temp2 = new Matrix();  
  41.   
  42. float[] mirrorY = {  
  43.   
  44. -1, 0, 0,  
  45. 0, 1, 0,  
  46. 0, 0, 1  
  47.   
  48. };  
  49.   
  50. temp.setValues(mirrorY);  
  51.   
  52. switch(transform){  
  53.   
  54. case Sprite.TRANS_NONE:  
  55.   
  56. break;  
  57.   
  58. case Sprite.TRANS_ROT90:  
  59.   
  60. mMatrix.setRotate(90,width/2, height/2);  
  61.   
  62. break;  
  63.   
  64. case Sprite.TRANS_ROT180:  
  65.   
  66. mMatrix.setRotate(180,width/2, height/2);  
  67.   
  68. break;  
  69.   
  70. case Sprite.TRANS_ROT270:  
  71.   
  72. mMatrix.setRotate(270,width/2, height/2);  
  73.   
  74. break;  
  75.   
  76. case Sprite.TRANS_MIRROR:  
  77.   
  78. mMatrix.postConcat(temp);  
  79.   
  80. break;  
  81.   
  82. case Sprite.TRANS_MIRROR_ROT90:  
  83.   
  84. mMatrix.postConcat(temp);  
  85.   
  86. mMatrix.setRotate(90,width/2, height/2);  
  87.   
  88. break;  
  89.   
  90. case Sprite.TRANS_MIRROR_ROT180:  
  91.   
  92. mMatrix.postConcat(temp);  
  93.   
  94. mMatrix.setRotate(180,width/2, height/2);  
  95.   
  96. break;  
  97.   
  98. case Sprite.TRANS_MIRROR_ROT270:  
  99.   
  100. mMatrix.postConcat(temp);  
  101.   
  102. mMatrix.setRotate(270,width/2, height/2);  
  103.   
  104. break;  
  105.   
  106. }  
  107.   
  108. mMatrix.setTranslate(x_dest, y_dest);  
  109.   
  110. canvas.drawBitmap(newMap, mMatrix, mPaint);  
  111.   
  112. }  



Java代码   收藏代码
  1. //图片Url保存为位图并进行缩放操作  
  2. //通过传入图片url获取位图方法  
  3. public Bitmap returnBitMap(String url) {  
  4.         URL myFileUrl = null;  
  5.         Bitmap bitmap = null;  
  6.         try {  
  7.             myFileUrl = new URL(url);  
  8.         } catch (MalformedURLException e) {  
  9.             e.printStackTrace();  
  10.         }  
  11.         try {  
  12.             HttpURLConnection conn = (HttpURLConnection) myFileUrl  
  13.                     .openConnection();  
  14.             conn.setDoInput(true);  
  15.             conn.connect();  
  16.             InputStream is = conn.getInputStream();  
  17.             bitmap = BitmapFactory.decodeStream(is);  
  18.             is.close();  
  19.         } catch (IOException e) {  
  20.             e.printStackTrace();  
  21.         }  
  22.         Log.v(tag, bitmap.toString());  
  23.   
  24.         return bitmap;  
  25.     }  
  26. //通过传入位图,新的宽.高比进行位图的缩放操作  
  27. public static Drawable resizeImage(Bitmap bitmap, int w, int h) {  
  28.   
  29.         // load the origial Bitmap  
  30.         Bitmap BitmapOrg = bitmap;  
  31.   
  32.         int width = BitmapOrg.getWidth();  
  33.         int height = BitmapOrg.getHeight();  
  34.         int newWidth = w;  
  35.         int newHeight = h;  
  36.   
  37.         Log.v(tag, String.valueOf(width));  
  38.         Log.v(tag, String.valueOf(height));  
  39.   
  40.         Log.v(tag, String.valueOf(newWidth));  
  41.         Log.v(tag, String.valueOf(newHeight));  
  42.   
  43.         // calculate the scale  
  44.         float scaleWidth = ((float) newWidth) / width;  
  45.         float scaleHeight = ((float) newHeight) / height;  
  46.   
  47.         // create a matrix for the manipulation  
  48.         Matrix matrix = new Matrix();  
  49.         // resize the Bitmap  
  50.         matrix.postScale(scaleWidth, scaleHeight);  
  51.         // if you want to rotate the Bitmap  
  52.         // matrix.postRotate(45);  
  53.   
  54.         // recreate the new Bitmap  
  55.         Bitmap resizedBitmap = Bitmap.createBitmap(BitmapOrg, 0, 0, width,  
  56.                 height, matrix, true);  
  57.   
  58.         // make a Drawable from Bitmap to allow to set the Bitmap  
  59.         // to the ImageView, ImageButton or what ever  
  60.         return new BitmapDrawable(resizedBitmap);  
  61.   
  62.     }  



Java代码   收藏代码
  1. 1.图片加载方法,方便用户加载图片  
  2. /*** 
  3. * 加载本地图片 
  4. * @param context:主运行函数实例 
  5. * @param bitAdress:图片地址,一般指向R下的drawable目录 
  6. * @return 
  7. */  
  8. public final Bitmap CreatImage(Context context, int bitAdress) {  
  9. Bitmap bitmaptemp = null;  
  10. bitmaptemp = BitmapFactory.decodeResource(context.getResources(),  
  11. bitAdress);  
  12. return bitmaptemp;  
  13. }  
  14. 2.图片平均分割方法,将大图平均分割为N行N列,方便用户使用  
  15. /*** 
  16. * 图片分割 
  17. * 
  18. * @param g 
  19. * :画布 
  20. * @param paint 
  21. * :画笔 
  22. * @param imgBit 
  23. * :图片 
  24. * @param x 
  25. * :X轴起点坐标 
  26. * @param y 
  27. * :Y轴起点坐标 
  28. * @param w 
  29. * :单一图片的宽度 
  30. * @param h 
  31. * :单一图片的高度 
  32. * @param line 
  33. * :第几列 
  34. * @param row 
  35. * :第几行 
  36. */  
  37. public final void cuteImage(Canvas g, Paint paint, Bitmap imgBit, int x,  
  38. int y, int w, int h, int line, int row) {  
  39. g.clipRect(x, y, x + w, h + y);  
  40. g.drawBitmap(imgBit, x – line * w, y – row * h, paint);  
  41. g.restore();  
  42. }  
  43. 3.图片缩放,对当前图片进行缩放处理  
  44. /*** 
  45. * 图片的缩放方法 
  46. * 
  47. * @param bgimage 
  48. * :源图片资源 
  49. * @param newWidth 
  50. * :缩放后宽度 
  51. * @param newHeight 
  52. * :缩放后高度 
  53. * @return 
  54. */  
  55. public Bitmap zoomImage(Bitmap bgimage, int newWidth, int newHeight) {  
  56. // 获取这个图片的宽和高  
  57. int width = bgimage.getWidth();  
  58. int height = bgimage.getHeight();  
  59. // 创建操作图片用的matrix对象  
  60. Matrix matrix = new Matrix();  
  61. // 计算缩放率,新尺寸除原始尺寸  
  62. float scaleWidth = ((float) newWidth) / width;  
  63. float scaleHeight = ((float) newHeight) / height;  
  64. // 缩放图片动作  
  65. matrix.postScale(scaleWidth, scaleHeight);  
  66. Bitmap bitmap = Bitmap.createBitmap(bgimage, 0, 0, width, height,  
  67. matrix, true);  
  68. return bitmap;  
  69. }  
  70. 4.绘制带有边框的文字,一般在游戏中起文字的美化作用  
  71. /*** 
  72. * 绘制带有边框的文字 
  73. * 
  74. * @param strMsg 
  75. * :绘制内容 
  76. * @param g 
  77. * :画布 
  78. * @param paint 
  79. * :画笔 
  80. * @param setx 
  81. * ::X轴起始坐标 
  82. * @param sety 
  83. * :Y轴的起始坐标 
  84. * @param fg 
  85. * :前景色 
  86. * @param bg 
  87. * :背景色 
  88. */  
  89. public void drawText(String strMsg, Canvas g, Paint paint, int setx,  
  90. int sety, int fg, int bg) {  
  91. paint.setColor(bg);  
  92. g.drawText(strMsg, setx + 1, sety, paint);  
  93. g.drawText(strMsg, setx, sety – 1, paint);  
  94. g.drawText(strMsg, setx, sety + 1, paint);  
  95. g.drawText(strMsg, setx – 1, sety, paint);  
  96. paint.setColor(fg);  
  97. g.drawText(strMsg, setx, sety, paint);  
  98. g.restore();  
  99. }  
  100. 5.Android 图片透明度处理代码  
  101. /** 
  102. * 图片透明度处理 
  103. * 
  104. * @param sourceImg 
  105. *            原始图片 
  106. * @param number 
  107. *            透明度 
  108. * @return 
  109. */  
  110. public static Bitmap setAlpha(Bitmap sourceImg, int number) {  
  111. int[] argb = new int[sourceImg.getWidth() * sourceImg.getHeight()];  
  112. sourceImg.getPixels(argb, 0, sourceImg.getWidth(), 0, 0,sourceImg.getWidth(), sourceImg.getHeight());// 获得图片的ARGB值  
  113. number = number * 255 / 100;  
  114. for (int i = 0; i < argb.length; i++) {  
  115. argb = (number << 24) | (argb & 0×00FFFFFF);// 修改最高2位的值  
  116. }  
  117. sourceImg = Bitmap.createBitmap(argb, sourceImg.getWidth(), sourceImg.getHeight(), Config.ARGB_8888);  
  118. return sourceImg;  
  119. }  
  120. 6.图片翻转  
  121. Resources res = this.getContext().getResources();  
  122. img = BitmapFactory.decodeResource(res, R.drawable.slogo);  
  123. Matrix matrix = new Matrix();  
  124. matrix.postRotate(90);        /*翻转90度*/  
  125. int width = img.getWidth();  
  126. int height = img.getHeight();  
  127. r_img = Bitmap.createBitmap(img, 0, 0, width, height, matrix, true);  

 

Java代码   收藏代码
  1. import android.graphics.Bitmap;  
  2. import android.graphics.Canvas;  
  3. import android.graphics.LinearGradient;  
  4. import android.graphics.Matrix;  
  5. import android.graphics.Paint;  
  6. import android.graphics.PixelFormat;  
  7. import android.graphics.PorterDuffXfermode;  
  8. import android.graphics.Rect;  
  9. import android.graphics.RectF;  
  10. import android.graphics.Bitmap.Config;  
  11. import android.graphics.PorterDuff.Mode;  
  12. import android.graphics.Shader.TileMode;  
  13. import android.graphics.drawable.Drawable;  
  14. /** 
  15. *  
  16. * @author superdev 
  17. * @version 1.0 
  18. * 
  19. */  
  20. public class ImageUtil {  
  21.   
  22. /** 
  23. * 放大缩小图片 
  24. */  
  25. public static Bitmap zoomBitmap(Bitmap bitmap, int w, int h) {  
  26.    int width = bitmap.getWidth();  
  27.    int height = bitmap.getHeight();  
  28.    Matrix matrix = new Matrix();  
  29.    float scaleWidht = ((float) w / width);  
  30.    float scaleHeight = ((float) h / height);  
  31.    matrix.postScale(scaleWidht, scaleHeight);  
  32.    Bitmap newbmp = Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, true);  
  33.    return newbmp;  
  34. }  
  35.   
  36. /** 
  37. * 将Drawable转化为Bitmap 
  38. */  
  39. public static Bitmap drawableToBitmap(Drawable drawable) {  
  40.    int width = drawable.getIntrinsicWidth();  
  41.    int height = drawable.getIntrinsicHeight();  
  42.    Bitmap bitmap = Bitmap.createBitmap(width, height, drawable.getOpacity() != PixelFormat.OPAQUE ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565);  
  43.    Canvas canvas = new Canvas(bitmap);  
  44.    drawable.setBounds(0, 0, width, height);  
  45.    drawable.draw(canvas);  
  46.    return bitmap;  
  47.   
  48. }  
  49.   
  50. /** 
  51. * 获得圆角图片的方法 
  52. */  
  53. public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, float roundPx) {  
  54.   
  55.    Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Config.ARGB_8888);  
  56.    Canvas canvas = new Canvas(output);  
  57.   
  58.    final int color = 0xff424242;  
  59.    final Paint paint = new Paint();  
  60.    final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());  
  61.    final RectF rectF = new RectF(rect);  
  62.   
  63.    paint.setAntiAlias(true);  
  64.    canvas.drawARGB(0, 0, 0, 0);  
  65.    paint.setColor(color);  
  66.    canvas.drawRoundRect(rectF, roundPx, roundPx, paint);  
  67.   
  68.    paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));  
  69.    canvas.drawBitmap(bitmap, rect, rect, paint);  
  70.   
  71.    return output;  
  72. }  
  73.   
  74. /** 
  75. * 获得带倒影的图片方法 
  76. */  
  77. public static Bitmap createReflectionImageWithOrigin(Bitmap bitmap) {  
  78.    final int reflectionGap = 4;  
  79.    int width = bitmap.getWidth();  
  80.    int height = bitmap.getHeight();  
  81.   
  82.    Matrix matrix = new Matrix();  
  83.    matrix.preScale(1, -1);  
  84.   
  85.    Bitmap reflectionImage = Bitmap.createBitmap(bitmap, 0, height / 2, width, height / 2, matrix, false);  
  86.   
  87.    Bitmap bitmapWithReflection = Bitmap.createBitmap(width, (height + height / 2), Config.ARGB_8888);  
  88.   
  89.    Canvas canvas = new Canvas(bitmapWithReflection);  
  90.    canvas.drawBitmap(bitmap, 0, 0, null);  
  91.    Paint deafalutPaint = new Paint();  
  92.    canvas.drawRect(0, height, width, height + reflectionGap, deafalutPaint);  
  93.   
  94.    canvas.drawBitmap(reflectionImage, 0, height + reflectionGap, null);  
  95.   
  96.    Paint paint = new Paint();  
  97.    LinearGradient shader = new LinearGradient(0, bitmap.getHeight(), 0, bitmapWithReflection.getHeight() + reflectionGap, 0x70ffffff, 0x00ffffff, TileMode.CLAMP);  
  98.    paint.setShader(shader);  
  99.    // Set the Transfer mode to be porter duff and destination in  
  100.    paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));  
  101.    // Draw a rectangle using the paint with our linear gradient  
  102.    canvas.drawRect(0, height, width, bitmapWithReflection.getHeight() + reflectionGap, paint);  
  103.    return bitmapWithReflection;  
  104. }  
  105. }  

 

Java代码   收藏代码
  1. private byte[] Bitmap2Bytes(Bitmap bm){  
  2.    ByteArrayOutputStream baos = new ByteArrayOutputStream();  
  3.    bm.compress(Bitmap.CompressFormat.PNG, 100, baos);  
  4.    return baos.toByteArray();  
  5. }  
  6. private Bitmap Bytes2Bimap(byte[] b){  
  7.             if(b.length!=0){  
  8.                 return BitmapFactory.decodeByteArray(b, 0, b.length);  
  9.             }  
  10.             else {  
  11.                 return null;  
  12.             }  
  13.       }  
  14.   
  15.  /** 
  16.      * create the bitmap from a byte array 
  17.      *生成水印图片 
  18.      * @param src the bitmap object you want proecss 
  19.      * @param watermark the water mark above the src 
  20.      * @return return a bitmap object ,if paramter's length is 0,return null 
  21.      */  
  22.     private Bitmap createBitmap( Bitmap src, Bitmap watermark )  
  23.     {  
  24.         String tag = "createBitmap";  
  25.         Log.d( tag, "create a new bitmap" );  
  26.         if( src == null )  
  27.         {  
  28.             return null;  
  29.         }  
  30.    
  31.         int w = src.getWidth();  
  32.         int h = src.getHeight();  
  33.         int ww = watermark.getWidth();  
  34.         int wh = watermark.getHeight();  
  35.         //create the new blank bitmap  
  36.         Bitmap newb = Bitmap.createBitmap( w, h, Config.ARGB_8888 );//创建一个新的和SRC长度宽度一样的位图  
  37.         Canvas cv = new Canvas( newb );  
  38.         //draw src into  
  39.         cv.drawBitmap( src, 0, 0, null );//在 0,0坐标开始画入src  
  40.         //draw watermark into  
  41.         cv.drawBitmap( watermark, w - ww + 5, h - wh + 5, null );//在src的右下角画入水印  
  42.         //save all clip  
  43.         cv.save( Canvas.ALL_SAVE_FLAG );//保存  
  44.         //store  
  45.         cv.restore();//存储  
  46.         return newb;  
  47.     }  
  48.    /** 重新编码Bitmap 
  49.    *  
  50.    * @param src 
  51.    *          需要重新编码的Bitmap 
  52.    * 
  53.    * @param format 
  54.    *          编码后的格式(目前只支持png和jpeg这两种格式) 
  55.    * 
  56.    * @param quality 
  57.    *          重新生成后的bitmap的质量 
  58.    * 
  59.    * @return 
  60.    *          返回重新生成后的bitmap 
  61.    */  
  62.  private static Bitmap codec(Bitmap src, Bitmap.CompressFormat format,  
  63.                                     int quality) {  
  64.             ByteArrayOutputStream os = new ByteArrayOutputStream();  
  65.             src.compress(format, quality, os);              
  66.   
  67.             byte[] array = os.toByteArray();  
  68.             return BitmapFactory.decodeByteArray(array, 0, array.length);  
  69.         }  
  70.   
  71. //Stream转换成Byte  
  72. static byte[] streamToBytes(InputStream is) {  
  73.       ByteArrayOutputStream os = new ByteArrayOutputStream(1024);  
  74.       byte[] buffer = new byte[1024];  
  75.       int len;  
  76.       try {  
  77.              while ((len = is.read(buffer)) >= 0) {  
  78.              os.write(buffer, 0, len);  
  79.              }  
  80.           } catch (java.io.IOException e) {  
  81.   
  82.           }  
  83.           return os.toByteArray();  
  84. }  
  85. //把View转换成Bitmap  
  86.   
  87.     /** 
  88.      * 把一个View的对象转换成bitmap 
  89.      */  
  90.     static Bitmap getViewBitmap(View v) {  
  91.           
  92.         v.clearFocus();  
  93.         v.setPressed(false);  
  94.   
  95.         //能画缓存就返回false  
  96.         boolean willNotCache = v.willNotCacheDrawing();  
  97.         v.setWillNotCacheDrawing(false);   
  98.         int color = v.getDrawingCacheBackgroundColor();  
  99.         v.setDrawingCacheBackgroundColor(0);  
  100.         if (color != 0) {  
  101.             v.destroyDrawingCache();  
  102.         }  
  103.         v.buildDrawingCache();  
  104.         Bitmap cacheBitmap = v.getDrawingCache();  
  105.         if (cacheBitmap == null) {  
  106.             Log.e(TAG, "failed getViewBitmap(" + v + ")", new RuntimeException());  
  107.             return null;  
  108.         }  
  109.         Bitmap bitmap = Bitmap.createBitmap(cacheBitmap);  
  110.         // Restore the view  
  111.         v.destroyDrawingCache();  
  112.         v.setWillNotCacheDrawing(willNotCache);  
  113.         v.setDrawingCacheBackgroundColor(color);  
  114.         return bitmap;  
  115.     }  

 

Java代码   收藏代码
  1. 读取raw资源文件中的mp3文件,然后通过音乐播放器播放:  
  2.   
  3.     /** 
  4.      * 把mp3文件写入卡 
  5.      *  
  6.      * @param fileName 
  7.      *             输出的文件名(全路径) 
  8.      * @param context 
  9.          *             context对象 
  10.      */  
  11.     private void writeMP3ToSDcard(String fileName, Context context) {  
  12.         byte[] buffer = new byte[1024 * 8];  
  13.         int read;  
  14.         BufferedInputStream bin = new BufferedInputStream(context.getResources().openRawResource(R.raw.ring));  
  15.         try {  
  16.             BufferedOutputStream bout = new BufferedOutputStream(new FileOutputStream(fileName));  
  17.             while ((read = bin.read(buffer)) > -1) {  
  18.                 bout.write(buffer, 0, read);  
  19.             }  
  20.             bout.flush();  
  21.             bout.close();  
  22.             bin.close();  
  23.         } catch (FileNotFoundException e) {  
  24.             e.printStackTrace();  
  25.         } catch (IOException e) {  
  26.             e.printStackTrace();  
  27.         }  
  28.     }  
  29.   
  30.   
  31. Intent intent = new Intent();  
  32. intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  
  33. intent.setAction(android.content.Intent.ACTION_VIEW);  
  34. intent.setDataAndType(Uri.fromFile(newFile("XXXXmp3的文件全路径")),"audio/*");  
  35. startActivity(intent);  



绘制图像倒影 

Java代码   收藏代码
  1. private void    
  2. _Init()     
  3. {     
  4.   m_paint = new Paint(Paint.ANTI_ALIAS_FLAG);     
  5.   LinearGradient lg = new LinearGradient(     
  6.     0, 0, 0, m_nShadowH,      
  7.     0xB0FFFFFF, 0x00000000,     
  8.     Shader.TileMode.CLAMP);     
  9.   m_paint.setShader(lg);     
  10.   m_paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.MULTIPLY));     
  11. }     
  12.     
  13. @Override protected void      
  14. onDraw(Canvas canvas)     
  15. {     
  16.   super.onDraw(canvas);     
  17.     
  18.   int nX = 0;     
  19.   int nY = 20;     
  20.     
  21.   _DrawNormalImg(canvas, nX, nY);     
  22.   _DrawMirror(canvas, nX, nY);     
  23. }      
  24.     
  25. private void    
  26. _DrawNormalImg(Canvas canvas, int nX, int nY)     
  27. {     
  28.   canvas.save(Canvas.MATRIX_SAVE_FLAG);     
  29.   canvas.translate(nX, nY);        
  30.   m_dw.draw(canvas);     
  31.   canvas.restore();     
  32. }     
  33.     
  34. private void    
  35. _DrawMirror(Canvas canvas, int nX, int nY)     
  36. {     
  37.   int nW = m_dw.getIntrinsicWidth();     
  38.   int nH = m_dw.getIntrinsicHeight();     
  39.     
  40.   ///////////////////////////////////     
  41.   //draw mirror image     
  42.   canvas.save(Canvas.MATRIX_SAVE_FLAG);     
  43.   canvas.scale(1.0f, -1.0f);     
  44.   canvas.translate(nX, -(nY + nH * 2));     
  45.   canvas.clipRect(0, nH, nW, nH - m_nShadowH);     
  46.   m_dw.draw(canvas);     
  47.   canvas.restore();     
  48.     
  49.   //////////////////////////////     
  50.   //draw mask     
  51.   canvas.save();     
  52.   canvas.translate(nX, nY + nH);     
  53.   canvas.drawRect(0, 0, nW, m_nShadowH, m_paint);     
  54.   canvas.restore();     
  55. }    


Android 繪圖座標體系預設的原點在左上角,X 軸往右是越來越大的正值,而 Y 軸往下,則是越來越大的正值。要畫出垂直翻轉的圖片,其實也就是要垂直翻轉整個繪圖座標體系。在 Android 中,要如何做?答案就是 canvas.scale(1.0f, -1.0f)。很簡單吧,沒想到給 scale() 函式一個負值,就可以翻轉相對應的軸。 
在 Photoshop 中,做鏡像特效的第二步是要對這翻轉的圖片,加個由灰到黑的漸層 mask。 
在 Android 中,要畫漸層色,那就一定得用 LinearGradient 這個類別。至於要對背景圖加上個 mask,就請參考一下 Paint 的 setXfermode() 函式。_Init() 這個函式,就是負責生成一個由灰到黑漸層 mask 的 m_paint 物件。 

 

http://blog.youkuaiyun.com/Android_Tutor/archive/2010/11/02/5981753.aspx 

http://www.cnblogs.com/TerryBlog/archive/2012/01/08/2316482.html 

android常用图片特效处理 
http://www.eoeandroid.com/thread-170526-1-1.html 

相机(Camera)实时滤镜效果 
http://www.eoeandroid.com/thread-171528-1-1.html 

Android, WindowsPhone7, IOS ,vc2010平台40多套图片滤镜开源 
http://www.cnblogs.com/daizhj/archive/2012/05/15/2501406.html 

Android实现获取本机中所有图片 
http://www.cnblogs.com/hanyonglu/archive/2012/05/10/2494908.html

Python 图片处理 使用 Python 进行图片处理。 阅读详情

相关推荐

Python图片处理库之thumbor使用详解

Thumbor 是一个功能强大的 Python 图片处理库,可以用于生成、裁剪、缩放、旋转和优化图像,同时还提供了安全性和缓存等功能。本文将详细介绍 Thumbor 库的特性、用法,并通过丰富的示例代码展示其在实际项目中的应用。

Rocky006的博客 836

将一个图片切割成多个图片

有种场景,我们想将一个图片切割成多个图片。比如我们在开发一个拼图的游戏,就首先要对图片进行切割。  以下是封装好的两个类,可以实现图片的切割。仅供参考和学习。  一个是ImagePiece类,此类保存了一个Bitmap对象和一个标识图片的顺序索引的int变量。  [java] view plaincopy import android.graph

2857

简谈JAVA图片处理

项目原因,最近需要弄下JAVA图片处理的东西,以前接触不多,还是上大学的时候写JAVA图形界面的时候用到了一些JAVA Image的东西,于是结合网上查资料头脑风暴了一把,JAVA图片处理归结起来有如下几种方法,其中java图片 处理的开源框架因为目前已经非常多了,所以这里并未列举全面,只是抛砖引玉列举一二: 1、利用JDK的Image库          java.awt.Graphi

beagreatprogrammer的专栏 1162

Android的Bitmap类-实现图片的分割、缩放、旋转

Bitmap是Android系统中的图像处理的最重要类之一。用它可以获取图像文件信息,进行图像剪切、旋转、缩放等操作,并可以指定格式保存图像文件。本文从应用的角度,着重介绍怎么用Bitmap来实现这些功能。           一、Bitmap的生成           1.1 BitmapFactory decode出Bitmap           Bitmap实现在android

小羊快跑的专栏 6012

图像分割:Android中使用OpenCV进行图像分割

在该方法中,我们选择一个或多个阈值,并将图像的像素分为不同的区域,根据像素值与阈值之间的关系。请注意,在使用OpenCV进行图像分割之前,确保已经正确配置和导入OpenCV库,并且图像文件的路径正确。这就是在Android中使用OpenCV进行图像分割的基本步骤。图像分割是计算机视觉领域的重要任务之一,它旨在将图像划分为具有语义或结构上相关性的不同区域。在本文中,我们将介绍如何在Android平台上使用OpenCV库进行图像分割,并提供相应的源代码示例。在进行图像分割之前,我们需要加载要处理的图像。

UaCode的博客 471

Java图片处理增强工具:rt java图片处理jar包

本文还有配套的精品资源,点击获取 简介:Java编程语言在处理图片任务时,常见的需求包括添加水印、裁剪、旋转和缩放等。"rt java图片处理jar包"是一个专门的Java库,旨在简化这些操作并提供易于使用的API。开发者可以利用Java AWT和Swing库进行基本图像处理,而Java Image I/O库支持处理多种图片格式。此外,第三方库往往提供更高效的图片处理功能。...

weixin_36178216的博客 1879

【自用】Android 切割Bitmap为多个小的Bitmap

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_33831196的博客 646

android 图片任意截取

实现了在android平台上将图片进行任意路径截取的功能.

Java图片处理开源框架

图片处理是当今软件开发中非常重要的一环,然而处理图片的开源框架却并不多。现金网上流传的Java处理图片的代码,虽然可对图片进行简单处理,但效果并不理想。虽然也有些其他解决方案,但都摆脱不了繁琐,使用起来十分不方便。 为了解决这个问题,我也是在网上找了好久,看了很多资料,功夫不负有心人,最终找到了一个处理图片十分棒的开源框架。特此拿出来与大家分享。 Thumbnailator 是一个优秀的图片处理的Google开源Java类库。处理效果远比Java API的好。从API提供现有的图像文件和图像对象的类中简

鹏霄万里展雄飞 5万+

YOLOv13+SAHI实战:5步搞定无人机航拍小目标检测(附VisDrone数据集调参技巧)

本文详细介绍了如何结合YOLOv13与SAHI(切片辅助超推理)技术,在VisDrone2019数据集上实现高效的无人机航拍小目标检测。通过5个实战步骤,包括环境配置、SAHI参数解析、数据集调优、完整训练推理流程和性能优化技巧,帮助开发者显著提升小目标检测的准确率和效率。

egg99的博客 429

python等级考试——一级知识点汇总(不包含turtle画图)

本篇文章是针对中国电子学会青少年编程等级考试的,适合初学者以及青少年编程学习者

weixin_65350557的博客 9025

Java图片处理

Java处理图片

WEN38306482的博客 49万+

Shader之——花草动画shader

今天 ,接到了个需求,花草的动画。谈到花草动画,立马就想到顶点动画,让顶点动起来就可以实现了。但是有个问题,所有的草都往一个方向运动,这个就麻烦了。因为在shader里没有随机这种概念,提到最多的是用一张噪声图来模拟。在网上搜索了一下,发现有更好的办法,就是用每个顶点到一个点的距离来控制动画的开始,毕竟每个顶点到同一个点的距离很少是一样的。 float dis = distance ...

baicaishisan的博客 2183

免费好用的图片处理工具

免费且好用的图片处理工具在市场上有很多选择,它们各自拥有不同的特点和优势。

xuweilin的博客 4839

Spring AI 实战:5 分钟搭建你的第一个 AI 应用(含完整代码)

能力关键 API适用场景基础对话简单问答、文本生成流式输出实时打字机效果@Bean模型需要调用外部工具结构化输出需要返回 Java 对象多轮对话聊天机器人场景Spring AI 让 Java 开发者可以用最熟悉的方式(Spring Boot + Maven)进入 AI 应用开发领域,不用学新语言,不用换框架,这是它最大的优势。但目前为止,我们的 AI 应用只能回答"它脑子里已有的知识"。如果让它读懂你自己的技术文档、公司内部知识库呢?这就是下一篇文章的主题——RAG(检索增强生成)实战。

qq_17204557的博客 642

FPGA数字信号处理中定点数的舍入与饱和硬件实现详解

在数字信号处理(DSP)的硬件实现中,定点数运算是核心基础。由于硬件资源(如FPGA的DSP Slice)的位宽有限,连续的乘加运算会导致数据位宽膨胀,严重影响时序和资源利用率。为解决此问题,必须引入舍入(Rounding)和饱和(Saturation)机制。舍入通过对低位进行四舍五入,在可控的精度损失下缩减位宽;饱和则作为动态范围的守护者,防止数据溢出导致信号环绕失真,确保系统行为确定。这两种技术是算法在有限精度硬件上正确、高效运行的关键,广泛应用于滤波器、FFT等DSP模块以及通信、音频处理等场景。本文

weixin_30954817的博客 246

java 图片处理

用到两个第三方库 1、thumbnailator:https://github.com/coobird/thumbnailator 2、TwelveMonkeys:https://github.com/haraldk/TwelveMonkeys thumbnailator是图片处理的工具类,提供了很多图片处理的便捷的方法,这样我们就不要用jdk底层的ImageIO类了 TwelveMonk

fengwind1的专栏 4346

YOLOv11涨点改进 | 全网独家首发、特征融合创新篇 | ACM 2025顶会 | 引入DAAttn差异感知注意力融合模块,通过动态调整注意力,使模型更准确地识别关键内容,提高精度、并减少冗余计算

本文提出了一种基于DAAttn(差异感知注意力融合)模块改进的YOLOv11模型,用于提升变化检测任务的性能。DAAttn模块通过动态加权特征差异,有效区分有意义变化与噪声(如光照、天气变化),显著提高了模型在复杂场景下的检测精度。该模块采用反转注意力机制,重点关注显著差异区域,同时减少计算冗余。实验表明,改进后的模型在保持计算效率的同时,能够更准确地识别小目标和细节变化。文章详细介绍了DAAttn的原理、优势、实现代码及其在YOLOv11中的集成方法,并提供了两种改进配置方案。

Ai缝合怪、助力小伙伴高效发论文 300

VBS+WIA图片处理

一、VBS图片处理之用VBS缩放图片大小 用到WIA中的Scale滤镜 Dim Img 'As ImageFile Dim IP 'As ImageProcess Set Img = CreateObject("WIA.ImageFile") Set IP = CreateObject("WIA.ImageProcess") Img.LoadFile "test.jpg" IP.

AMinfo的专栏 8232

【虚幻引擎UE】UE5 仅需6步轻松实现关卡顺滑切换

【虚幻引擎UE】UE5 仅需6步轻松实现关卡切换

灵境引路人 2万+

milvus | 第 1 章:从“相似图片搜索”理解 Milvus 向量数据库

本文介绍了向量数据库Milvus的核心概念和基本架构。主要内容包括:1)向量数据库解决的是高维向量相似度检索问题,通过Embedding将非结构化数据转换为向量进行比较;2)Milvus作为分布式向量数据库,包含Proxy、Coordinator、QueryNode等多个组件协同工作;3)关键概念如Collection、Schema、Segment等构成了Milvus的数据组织方式;4)典型使用流程包括创建集合、插入数据、构建索引、加载数据和执行搜索五个步骤。文章为后续深入理解Milvus源码提供了基础知识

weixin_43674738的博客 132

java图片处理

package com.coolsn.modules.tb.qrcode; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Transparency; import java.awt.geom.Ellipse2D; import java.awt.image.Buff.

qqtbqq的博客 1286

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

JAVA 图片处理详解

本文介绍了Java图片处理的技术方案,包括标准库和第三方库。Java标准库主要使用BufferedImage、ImageIO和Graphics2D类进行图片读写、像素操作和图形绘制。第三方库推荐Thumbnailator(简单缩放/裁剪)、ImageJ(科研图像分析)和OpenCV(计算机视觉)。文章提供了常见图片处理示例(缩放/裁剪/水印)和验证码生成完整代码,包含随机字符、干扰线、旋转效果等安全特性。根据不同需求,建议简单处理用标准库,复杂需求选择第三方库,并给出了性能优化建议。

onlymscn的博客 1254

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

如果我要做一款图片处理软件

如果我要做一款图片处理软件 题记 自私的一种表现,就是不愿过多的分享想法,又总觉得自己的想法是多么完美。 背景 虽然刚开始在做一款图片处理的软件,其实这个时候往往会有很多的想法。但是由于经验不足,这些想法总是会有很多的缺陷,所以通过整理,发布的方式,与人交流的方式,来逐步优化自己的方案,也是一种学习的过程。希望那些有相关经验的同学,在看到这个文章后,能给我提一些建议,再次表示十分的感谢 目标用户 由于我属于起步的做同类性质的软件,在国内国外都有十分成熟的图片处理软件了。但是我一直觉得他们的处理都过于复杂,如

zxy5691419的专栏 341

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

oss图片处理

参考: 阿里云 - OSS - 图片处理操作方式 通过图片的访问URL后添加相应的图片处理参数或图片样式处理图片。 使用图片处理参数 格式为: https://bucketname.endpoint/objectname?x-oss-process=image/action,parame_value https://bucketname.endpoint/objectname:Object的访问地址。 x-oss-process=image/:固定参数,标明使用图片处理参数对图片文件进行处理。 action

罗小爬的技术宝书 2689

android图片处理方法(不断收集中…

Android 中图片处理方法技巧大汇总,几乎涵盖了所有的图片处理方法! http://gundumw100.iteye.com/blog/849729 http://www.cnblogs.com/lbangel/p/3612588.html 再奉上一个自己整理的图片处理工具类,里边都是静态方法,可以直接调用就好: package com.lyc.image.tools; public c

笑傲人生的博客 446
上一篇: eclipse中安装adt失败
下一篇: Android图片处理(Matrix,ColorMatrix)
束千凡
博客等级 码龄14年 21粉丝 56原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值