uamp: Failed to create image decoder with message 'unimplemented'

Getting the following debug message on app startup (emulator Pixel 3A, API 29)

2020-05-14 13:14:36.381 12259-12305/com.example.android.uamp.next D/skia: --- Failed to create image decoder with message 'unimplemented'

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

for me this happens when converting Drawable to byte[], this did work:

public static Bitmap drawableToBitmap (Drawable drawable) {
        Bitmap bitmap = null;

        if (drawable instanceof BitmapDrawable) {
            BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
            if(bitmapDrawable.getBitmap() != null) {
                return bitmapDrawable.getBitmap();
            }
        }

        if(drawable.getIntrinsicWidth() <= 0 || drawable.getIntrinsicHeight() <= 0) {
            bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); // Single color bitmap will be created of 1x1 pixel
        } else {
            bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
        }

        Canvas canvas = new Canvas(bitmap);
        drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
        drawable.draw(canvas);
        return bitmap;
    }

// icon
        Drawable test = mActivity.getDrawable(R.drawable.ic_apps_black_24dp);
        Bitmap bmp = drawableToBitmap(test);
        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);
        byte[] byteArray = stream.toByteArray();
        bmp.recycle();