40
40
*/
41
41
public class BaseImageDecoder implements ImageDecoder {
42
42
43
- protected static final String LOG_SABSAMPLE_IMAGE = "Subsample original image (%1$s) to %2$s (scale = %3$d) [%4$s]" ;
43
+ protected static final String LOG_SUBSAMPLE_IMAGE = "Subsample original image (%1$s) to %2$s (scale = %3$d) [%4$s]" ;
44
44
protected static final String LOG_SCALE_IMAGE = "Scale subsampled image (%1$s) to %2$s (scale = %3$.5f) [%4$s]" ;
45
45
protected static final String LOG_ROTATE_IMAGE = "Rotate image on %1$d\u00B0 [%2$s]" ;
46
46
protected static final String LOG_FLIP_IMAGE = "Flip image horizontally [%s]" ;
@@ -66,6 +66,7 @@ public BaseImageDecoder(boolean loggingEnabled) {
66
66
* @throws IOException if some I/O exception occurs during image reading
67
67
* @throws UnsupportedOperationException if image URI has unsupported scheme(protocol)
68
68
*/
69
+ @ Override
69
70
public Bitmap decode (ImageDecodingInfo decodingInfo ) throws IOException {
70
71
Bitmap decodedBitmap ;
71
72
ImageFileInfo imageInfo ;
@@ -83,7 +84,7 @@ public Bitmap decode(ImageDecodingInfo decodingInfo) throws IOException {
83
84
if (decodedBitmap == null ) {
84
85
L .e (ERROR_CANT_DECODE_IMAGE , decodingInfo .getImageKey ());
85
86
} else {
86
- decodedBitmap = considerExactScaleAndOrientaiton (decodedBitmap , decodingInfo , imageInfo .exif .rotation ,
87
+ decodedBitmap = considerExactScaleAndOrientatiton (decodedBitmap , decodingInfo , imageInfo .exif .rotation ,
87
88
imageInfo .exif .flipHorizontal );
88
89
}
89
90
return decodedBitmap ;
@@ -159,7 +160,7 @@ protected Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo
159
160
scale = ImageSizeUtils .computeImageSampleSize (imageSize , targetSize , decodingInfo .getViewScaleType (), powerOf2 );
160
161
}
161
162
if (scale > 1 && loggingEnabled ) {
162
- L .d (LOG_SABSAMPLE_IMAGE , imageSize , imageSize .scaleDown (scale ), scale , decodingInfo .getImageKey ());
163
+ L .d (LOG_SUBSAMPLE_IMAGE , imageSize , imageSize .scaleDown (scale ), scale , decodingInfo .getImageKey ());
163
164
}
164
165
165
166
Options decodingOptions = decodingInfo .getDecodingOptions ();
@@ -177,7 +178,7 @@ protected InputStream resetStream(InputStream imageStream, ImageDecodingInfo dec
177
178
return imageStream ;
178
179
}
179
180
180
- protected Bitmap considerExactScaleAndOrientaiton (Bitmap subsampledBitmap , ImageDecodingInfo decodingInfo ,
181
+ protected Bitmap considerExactScaleAndOrientatiton (Bitmap subsampledBitmap , ImageDecodingInfo decodingInfo ,
181
182
int rotation , boolean flipHorizontal ) {
182
183
Matrix m = new Matrix ();
183
184
// Scale to exact size if need
0 commit comments