use of com.davemorrissey.labs.subscaleview.decoder.SkiaImageRegionDecoder in project Signal-Android by signalapp.
the class AttachmentRegionDecoder method init.
@Override
public Point init(Context context, Uri uri) throws Exception {
Log.w(TAG, "Init!");
if (!PartAuthority.isLocalUri(uri)) {
passthrough = new SkiaImageRegionDecoder();
return passthrough.init(context, uri);
}
InputStream inputStream = PartAuthority.getAttachmentStream(context, uri);
this.bitmapRegionDecoder = BitmapRegionDecoder.newInstance(inputStream, false);
inputStream.close();
return new Point(bitmapRegionDecoder.getWidth(), bitmapRegionDecoder.getHeight());
}
use of com.davemorrissey.labs.subscaleview.decoder.SkiaImageRegionDecoder in project Signal-Android by WhisperSystems.
the class AttachmentRegionDecoder method init.
@Override
public Point init(Context context, Uri uri) throws Exception {
Log.d(TAG, "Init!");
if (!PartAuthority.isLocalUri(uri)) {
passthrough = new SkiaImageRegionDecoder();
return passthrough.init(context, uri);
}
InputStream inputStream = PartAuthority.getAttachmentStream(context, uri);
this.bitmapRegionDecoder = BitmapRegionDecoder.newInstance(inputStream, false);
inputStream.close();
return new Point(bitmapRegionDecoder.getWidth(), bitmapRegionDecoder.getHeight());
}
Aggregations