- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
26 lines
872 B
Java
26 lines
872 B
Java
package com.fyber.inneractive.sdk.util;
|
|
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.BitmapFactory;
|
|
import android.util.Base64;
|
|
import java.io.ByteArrayOutputStream;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class i0 {
|
|
public static String a(Bitmap bitmap) {
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
|
|
return Base64.encodeToString(byteArrayOutputStream.toByteArray(), 0);
|
|
}
|
|
|
|
public static Bitmap a(String str) {
|
|
try {
|
|
byte[] decode = Base64.decode(str, 0);
|
|
return BitmapFactory.decodeByteArray(decode, 0, decode.length);
|
|
} catch (Exception e) {
|
|
IAlog.a("IAimageLoaderUtil failed stringToBitMap with %s", e.getMessage());
|
|
return null;
|
|
}
|
|
}
|
|
}
|