I'm looking for a way on how can I convert a TransitionDrawable to Drawable or To bitmap to be able to save the Image.
I have been looking for a while and I tried a lot methods and no clue.
here a code what I have tried :
TransitionDrawable drawable = (TransitionDrawable) profil.getDrawable();
Drawable drawalb = drawable.mutate();
final Bitmap bitmap = ((BitmapDrawable) drawalb).getBitmap();
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] image = stream.toByteArray();