70 lines
1.8 KiB
Java
70 lines
1.8 KiB
Java
|
package com.bumptech.glide.load;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
import java.io.InputStream;
|
||
|
import java.nio.ByteBuffer;
|
||
|
import o.Opg;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public interface ImageHeaderParser {
|
||
|
int a(InputStream inputStream, Opg opg) throws IOException;
|
||
|
|
||
|
ImageType a(ByteBuffer byteBuffer) throws IOException;
|
||
|
|
||
|
ImageType b(InputStream inputStream) throws IOException;
|
||
|
|
||
|
int d(ByteBuffer byteBuffer, Opg opg) throws IOException;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public enum ImageType {
|
||
|
GIF(true),
|
||
|
JPEG(false),
|
||
|
RAW(false),
|
||
|
PNG_A(true),
|
||
|
PNG(false),
|
||
|
WEBP_A(true),
|
||
|
WEBP(false),
|
||
|
ANIMATED_WEBP(true),
|
||
|
AVIF(true),
|
||
|
UNKNOWN(false);
|
||
|
|
||
|
private final boolean hasAlpha;
|
||
|
|
||
|
ImageType(boolean z) {
|
||
|
this.hasAlpha = z;
|
||
|
}
|
||
|
|
||
|
public final boolean isWebp() {
|
||
|
int i = AnonymousClass2.c[ordinal()];
|
||
|
return i == 1 || i == 2 || i == 3;
|
||
|
}
|
||
|
|
||
|
public final boolean hasAlpha() {
|
||
|
return this.hasAlpha;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* renamed from: com.bumptech.glide.load.ImageHeaderParser$2, reason: invalid class name */
|
||
|
/* loaded from: classes.dex */
|
||
|
static /* synthetic */ class AnonymousClass2 {
|
||
|
static final int[] c;
|
||
|
|
||
|
static {
|
||
|
int[] iArr = new int[ImageType.values().length];
|
||
|
c = iArr;
|
||
|
try {
|
||
|
iArr[ImageType.WEBP.ordinal()] = 1;
|
||
|
} catch (NoSuchFieldError unused) {
|
||
|
}
|
||
|
try {
|
||
|
c[ImageType.WEBP_A.ordinal()] = 2;
|
||
|
} catch (NoSuchFieldError unused2) {
|
||
|
}
|
||
|
try {
|
||
|
c[ImageType.ANIMATED_WEBP.ordinal()] = 3;
|
||
|
} catch (NoSuchFieldError unused3) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|