@Override public InputStream getStreamFromOtherSource(String imageUri, Object extra) throws IOException { if (imageUri.startsWith(BASE64_URI_PREFIX)) { return getStreamFormBase64(imageUri, extra); } return super.getStreamFromOtherSource(imageUri, extra); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } Bitmap roundedBitmap = roundCorners(bitmap, (ImageViewAware) imageAware, roundPixels); imageAware.setImageBitmap(roundedBitmap); }
@Override protected InputStream getImageStream(ImageDecodingInfo decodingInfo) throws IOException { InputStream stream = decodingInfo.getDownloader() .getStream(decodingInfo.getImageUri(), decodingInfo.getExtraForDownloader()); return stream == null ? null : new JpegClosedInputStream(stream); }
roundBitmap = getRoundedCornerBitmap(bitmap, roundPixels, srcRect, destRect, width, height); } catch (OutOfMemoryError e) { L.e(e, "Can't create bitmap with rounded corners. Not enough memory.");
@Override public InputStream getStreamFromOtherSource(String imageUri, Object extra) throws IOException { if (imageUri.startsWith(BASE64_URI_PREFIX)) { return getStreamFormBase64(imageUri, extra); } return super.getStreamFromOtherSource(imageUri, extra); }
@Override protected InputStream getImageStream(ImageDecodingInfo decodingInfo) throws IOException { InputStream stream = decodingInfo.getDownloader() .getStream(decodingInfo.getImageUri(), decodingInfo.getExtraForDownloader()); return stream == null ? null : new JpegClosedInputStream(stream); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } Bitmap roundedBitmap = roundCorners(bitmap, (ImageViewAware) imageAware, roundPixels); imageAware.setImageBitmap(roundedBitmap); }
roundBitmap = getRoundedCornerBitmap(bitmap, roundPixels, srcRect, destRect, width, height); } catch (OutOfMemoryError e) { L.e(e, "Can't create bitmap with rounded corners. Not enough memory.");