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'
getting the same error everytime I do an ffmpeg
@plazar99 What do you mean by "do an ffmpeg"?
Last night the clues led me away from ffmpeg and to the Glide that I have in recycler. The recycler pulls videos from Getty.
same issue here any development on this?
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();
Check whether latest version of Glide fixes this. If it doesn't then we should open a bug against Glide.
Also getting this while developing in Dart (Flutter) with VSCode.
I get that when there's a sizing issue which causes a layout issue.
I/flutter ( 6752): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 6752): The following assertion was thrown during performLayout():
I/flutter ( 6752): RenderBox was not laid out: RenderPointerListener#00bc7 relayoutBoundary=up10 NEEDS-PAINT
I/flutter ( 6752): NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 6752): 'package:flutter/src/rendering/box.dart':
I/flutter ( 6752): Failed assertion: line 1940 pos 12: 'hasSize'
I/flutter ( 6752):
I/flutter ( 6752): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter ( 6752): more information in this error message to help you determine and fix the underlying cause.
I/flutter ( 6752): In either case, please report this assertion by filing a bug on GitHub:
I/flutter ( 6752): https://github.com/flutter/flutter/issues/new?template=2_bug.md
Currently, getting the same error on ver 12?
D/skia: --- Failed to create image decoder with message 'unimplemented'
W/Glide: Load failed for null with size [0x0]
class com.bumptech.glide.load.engine.GlideException: Received null model`
while the size of byte array is not 0
We are seeing same issue
+1
+1
+1
I translate the code of @niektuytel to kotlin
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
object BitmapTransformer {
fun drawableToBitmap(drawable: Drawable): Bitmap {
if(drawable is BitmapDrawable) {
if(drawable.bitmap != null) {
return drawable.bitmap
}
}
// Single color bitmap will be created of 1x1 pixel
val bitmap : Bitmap =
if(drawable.intrinsicWidth <= 0 || drawable.intrinsicHeight <= 0) {
Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
} else {
Bitmap.createBitmap(drawable.intrinsicWidth, drawable.intrinsicHeight, Bitmap.Config.ARGB_8888)
}
val canvas = Canvas(bitmap)
drawable.setBounds(0, 0, canvas.width, canvas.height);
drawable.draw(canvas);
return bitmap
}
}
I've found this and it may help:
val markerOption = MarkerOptions().apply {
position(LatLng(driver.lat, driver.lng))
icon(R.drawabel.your_drawable.toBitmapDescriptor(context))
snippet(driver.driverId.toString())
}
mMap.addMarker(markerOption)
fun Int.toBitmapDescriptor(context: Context): BitmapDescriptor {
val vectorDrawable = ResourcesCompat.getDrawable(context.resources, this, context.theme)
val bitmap = vectorDrawable?.toBitmap(
vectorDrawable.intrinsicWidth,
vectorDrawable.intrinsicHeight,
Bitmap.Config.ARGB_8888
)
return BitmapDescriptorFactory.fromBitmap(bitmap!!)
}
same issue
same issue....