Lines Matching refs:scale
96 // Find the min x that 1 / x >= scale
97 public static int computeSampleSizeLarger(float scale) {
98 int initialSize = (int) Math.floor(1 / scale);
106 // Find the max x that 1 / x <= scale.
107 public static int computeSampleSize(float scale) {
108 Utils.assertTrue(scale > 0);
109 int initialSize = Math.max(1, (int) Math.ceil(1 / scale));
116 Bitmap bitmap, float scale, boolean recycle) {
117 int width = Math.round(bitmap.getWidth() * scale);
118 int height = Math.round(bitmap.getHeight() * scale);
123 canvas.scale(scale, scale);
142 float scale = Math.min(
144 if (scale >= 1.0f) return bitmap;
145 return resizeBitmapByScale(bitmap, scale, recycle);
153 // scale the image so that the shorter side equals to the target;
155 float scale = (float) size / Math.min(w, h);
158 int width = Math.round(scale * bitmap.getWidth());
159 int height = Math.round(scale * bitmap.getHeight());
162 canvas.scale(scale, scale);