(Bitmap source, int size)
| 150 | } |
| 151 | |
| 152 | public static Bitmap processBitmap(Bitmap source, int size) { |
| 153 | |
| 154 | int image_height = source.getHeight(); |
| 155 | int image_width = source.getWidth(); |
| 156 | |
| 157 | Bitmap croppedBitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888); |
| 158 | |
| 159 | Matrix frameToCropTransformations = getTransformationMatrix(image_width, image_height, size, size, 0, false); |
| 160 | Matrix cropToFrameTransformations = new Matrix(); |
| 161 | frameToCropTransformations.invert(cropToFrameTransformations); |
| 162 | |
| 163 | final Canvas canvas = new Canvas(croppedBitmap); |
| 164 | canvas.drawBitmap(source, frameToCropTransformations, null); |
| 165 | |
| 166 | return croppedBitmap; |
| 167 | } |
| 168 | |
| 169 | public static void writeToFile(String data, Context context) { |
| 170 | try { |
nothing calls this directly
no test coverage detected