MD5 校验值:d7f913ab91d7343430e85d5ce2e5aff0
a.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package w0; import android.content.res.AssetManager; import android.media.MediaDataSource; import android.media.MediaMetadataRetriever; import android.os.Build; import android.system.OsConstants; import android.util.Log; import androidx.appcompat.widget.w0; import androidx.exifinterface.media.ExifInterface; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.DataInput; import java.io.DataInputStream; import java.io.EOFException; import java.io.FileDescriptor; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.charset.Charset; import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TimeZone; import java.util.regex.Pattern; import java.util.zip.CRC32; import w0.b; public class a { public static final String[] E; public static final int[] F; public static final byte[] G; public static final d H; public static final d[][] I; public static final d[] J; public static final HashMap<Integer, ExifInterface.ExifTag>[] K; public static final HashMap<String, ExifInterface.ExifTag>[] L; public static final HashSet<String> M; public static final HashMap<Integer, Integer> N; public static final Charset O; public static final byte[] P; public static final byte[] Q; public FileDescriptor f43597a; public AssetManager.AssetInputStream f43598b; public int f43599c; public boolean f43600d; public final HashMap<String, ExifInterface.ExifAttribute>[] f43601e; public Set<Integer> f43602f; public ByteOrder f43603g; public boolean f43604h; public int f43605i; public int f43606j; public int f43607k; public int f43608l; public static final boolean f43583m = Log.isLoggable("ExifInterface", 3); public static final List<Integer> f43584n = Arrays.asList(1, 6, 3, 8); public static final List<Integer> f43585o = Arrays.asList(2, 7, 4, 5); public static final int[] f43586p = {8, 8, 8}; public static final int[] f43587q = {8}; public static final byte[] f43588r = {-1, -40, -1}; public static final byte[] f43589s = {102, 116, 121, 112}; public static final byte[] f43590t = {109, 105, 102, 49}; public static final byte[] f43591u = {104, 101, 105, 99}; public static final byte[] f43592v = {79, 76, 89, 77, 80, 0}; public static final byte[] f43593w = {79, 76, 89, 77, 80, 85, 83, 0, 73, 73}; public static final byte[] f43594x = {-119, 80, 78, 71, 13, 10, 26, 10}; public static final byte[] f43595y = {101, 88, 73, 102}; public static final byte[] f43596z = {73, 72, 68, 82}; public static final byte[] A = {73, 69, 78, 68}; public static final byte[] B = {82, 73, 70, 70}; public static final byte[] C = {87, 69, 66, 80}; public static final byte[] D = {69, 88, 73, 70}; public class C0295a extends MediaDataSource { public long f43609a; public final f f43610b; public C0295a(a aVar, f fVar) { this.f43610b = fVar; } @Override public void close() { } @Override public long getSize() { return -1L; } @Override public int readAt(long j10, byte[] bArr, int i10, int i11) { if (i11 == 0) { return 0; } if (j10 < 0) { return -1; } try { long j11 = this.f43609a; if (j11 != j10) { if (j11 >= 0 && j10 >= j11 + this.f43610b.available()) { return -1; } this.f43610b.c(j10); this.f43609a = j10; } if (i11 > this.f43610b.available()) { i11 = this.f43610b.available(); } f fVar = this.f43610b; int read = fVar.f43613a.read(bArr, i10, i11); fVar.f43615c += read; if (read >= 0) { this.f43609a += read; return read; } } catch (IOException unused) { } this.f43609a = -1L; return -1; } } public static class b extends InputStream implements DataInput { public static final ByteOrder f43611e = ByteOrder.LITTLE_ENDIAN; public static final ByteOrder f43612f = ByteOrder.BIG_ENDIAN; public final DataInputStream f43613a; public ByteOrder f43614b; public int f43615c; public byte[] f43616d; public b(InputStream inputStream, ByteOrder byteOrder) { this.f43614b = ByteOrder.BIG_ENDIAN; DataInputStream dataInputStream = new DataInputStream(inputStream); this.f43613a = dataInputStream; dataInputStream.mark(0); this.f43615c = 0; this.f43614b = byteOrder; } public b(byte[] bArr) { this(new ByteArrayInputStream(bArr), ByteOrder.BIG_ENDIAN); } public long a() { return readInt() & 4294967295L; } @Override public int available() { return this.f43613a.available(); } public void b(int i10) { int i11 = 0; while (i11 < i10) { int i12 = i10 - i11; int skip = (int) this.f43613a.skip(i12); if (skip <= 0) { if (this.f43616d == null) { this.f43616d = new byte[8192]; } skip = this.f43613a.read(this.f43616d, 0, Math.min(8192, i12)); if (skip == -1) { throw new EOFException(k0.e.a("Reached EOF while skipping ", i10, " bytes.")); } } i11 += skip; } this.f43615c += i11; } @Override public void mark(int i10) { throw new UnsupportedOperationException("Mark is currently unsupported"); } @Override public int read() { this.f43615c++; return this.f43613a.read(); } @Override public int read(byte[] bArr, int i10, int i11) { int read = this.f43613a.read(bArr, i10, i11); this.f43615c += read; return read; } @Override public boolean readBoolean() { this.f43615c++; return this.f43613a.readBoolean(); } @Override public byte readByte() { this.f43615c++; int read = this.f43613a.read(); if (read >= 0) { return (byte) read; } throw new EOFException(); } @Override public char readChar() { this.f43615c += 2; return this.f43613a.readChar(); } @Override public double readDouble() { return Double.longBitsToDouble(readLong()); } @Override public float readFloat() { return Float.intBitsToFloat(readInt()); } @Override public void readFully(byte[] bArr) { this.f43615c += bArr.length; this.f43613a.readFully(bArr); } @Override public void readFully(byte[] bArr, int i10, int i11) { this.f43615c += i11; this.f43613a.readFully(bArr, i10, i11); } @Override public int readInt() { this.f43615c += 4; int read = this.f43613a.read(); int read2 = this.f43613a.read(); int read3 = this.f43613a.read(); int read4 = this.f43613a.read(); if ((read | read2 | read3 | read4) < 0) { throw new EOFException(); } ByteOrder byteOrder = this.f43614b; if (byteOrder == f43611e) { return (read4 << 24) + (read3 << 16) + (read2 << 8) + read; } if (byteOrder == f43612f) { return (read << 24) + (read2 << 16) + (read3 << 8) + read4; } StringBuilder a10 = android.support.v4.media.b.a("Invalid byte order: "); a10.append(this.f43614b); throw new IOException(a10.toString()); } @Override public String readLine() { Log.d("ExifInterface", "Currently unsupported"); return null; } @Override public long readLong() { this.f43615c += 8; int read = this.f43613a.read(); int read2 = this.f43613a.read(); int read3 = this.f43613a.read(); int read4 = this.f43613a.read(); int read5 = this.f43613a.read(); int read6 = this.f43613a.read(); int read7 = this.f43613a.read(); int read8 = this.f43613a.read(); if ((read | read2 | read3 | read4 | read5 | read6 | read7 | read8) < 0) { throw new EOFException(); } ByteOrder byteOrder = this.f43614b; if (byteOrder == f43611e) { return (read8 << 56) + (read7 << 48) + (read6 << 40) + (read5 << 32) + (read4 << 24) + (read3 << 16) + (read2 << 8) + read; } if (byteOrder == f43612f) { return (read << 56) + (read2 << 48) + (read3 << 40) + (read4 << 32) + (read5 << 24) + (read6 << 16) + (read7 << 8) + read8; } StringBuilder a10 = android.support.v4.media.b.a("Invalid byte order: "); a10.append(this.f43614b); throw new IOException(a10.toString()); } @Override public short readShort() { this.f43615c += 2; int read = this.f43613a.read(); int read2 = this.f43613a.read(); if ((read | read2) < 0) { throw new EOFException(); } ByteOrder byteOrder = this.f43614b; if (byteOrder == f43611e) { return (short) ((read2 << 8) + read); } if (byteOrder == f43612f) { return (short) ((read << 8) + read2); } StringBuilder a10 = android.support.v4.media.b.a("Invalid byte order: "); a10.append(this.f43614b); throw new IOException(a10.toString()); } @Override public String readUTF() { this.f43615c += 2; return this.f43613a.readUTF(); } @Override public int readUnsignedByte() { this.f43615c++; return this.f43613a.readUnsignedByte(); } @Override public int readUnsignedShort() { this.f43615c += 2; int read = this.f43613a.read(); int read2 = this.f43613a.read(); if ((read | read2) < 0) { throw new EOFException(); } ByteOrder byteOrder = this.f43614b; if (byteOrder == f43611e) { return (read2 << 8) + read; } if (byteOrder == f43612f) { return (read << 8) + read2; } StringBuilder a10 = android.support.v4.media.b.a("Invalid byte order: "); a10.append(this.f43614b); throw new IOException(a10.toString()); } @Override public void reset() { throw new UnsupportedOperationException("Reset is currently unsupported"); } @Override public int skipBytes(int i10) { throw new UnsupportedOperationException("skipBytes is currently unsupported"); } } public static class c { public final int f43617a; public final int f43618b; public final long f43619c; public final byte[] f43620d; public c(int i10, int i11, long j10, byte[] bArr) { this.f43617a = i10; this.f43618b = i11; this.f43619c = j10; this.f43620d = bArr; } public c(int i10, int i11, byte[] bArr) { this.f43617a = i10; this.f43618b = i11; this.f43619c = -1L; this.f43620d = bArr; } public static c a(String str) { byte[] bytes = (str + (char) 0).getBytes(a.O); return new c(2, bytes.length, bytes); } public static c b(long j10, ByteOrder byteOrder) { long[] jArr = {j10}; ByteBuffer wrap = ByteBuffer.wrap(new byte[a.F[4] * 1]); wrap.order(byteOrder); for (int i10 = 0; i10 < 1; i10++) { wrap.putInt((int) jArr[i10]); } return new c(4, 1, wrap.array()); } public static c c(e eVar, ByteOrder byteOrder) { e[] eVarArr = {eVar}; ByteBuffer wrap = ByteBuffer.wrap(new byte[a.F[5] * 1]); wrap.order(byteOrder); for (int i10 = 0; i10 < 1; i10++) { e eVar2 = eVarArr[i10]; wrap.putInt((int) eVar2.f43625a); wrap.putInt((int) eVar2.f43626b); } return new c(5, 1, wrap.array()); } public static c d(int i10, ByteOrder byteOrder) { int[] iArr = {i10}; ByteBuffer wrap = ByteBuffer.wrap(new byte[a.F[3] * 1]); wrap.order(byteOrder); for (int i11 = 0; i11 < 1; i11++) { wrap.putShort((short) iArr[i11]); } return new c(3, 1, wrap.array()); } public double e(ByteOrder byteOrder) { Object h10 = h(byteOrder); if (h10 == null) { throw new NumberFormatException("NULL can't be converted to a double value"); } if (h10 instanceof String) { return Double.parseDouble((String) h10); } if (h10 instanceof long[]) { if (((long[]) h10).length == 1) { return r5[0]; } throw new NumberFormatException("There are more than one component"); } if (h10 instanceof int[]) { if (((int[]) h10).length == 1) { return r5[0]; } throw new NumberFormatException("There are more than one component"); } if (h10 instanceof double[]) { double[] dArr = (double[]) h10; if (dArr.length == 1) { return dArr[0]; } throw new NumberFormatException("There are more than one component"); } if (!(h10 instanceof e[])) { throw new NumberFormatException("Couldn't find a double value"); } e[] eVarArr = (e[]) h10; if (eVarArr.length != 1) { throw new NumberFormatException("There are more than one component"); } e eVar = eVarArr[0]; return eVar.f43625a / eVar.f43626b; } public int f(ByteOrder byteOrder) { Object h10 = h(byteOrder); if (h10 == null) { throw new NumberFormatException("NULL can't be converted to a integer value"); } if (h10 instanceof String) { return Integer.parseInt((String) h10); } if (h10 instanceof long[]) { long[] jArr = (long[]) h10; if (jArr.length == 1) { return (int) jArr[0]; } throw new NumberFormatException("There are more than one component"); } if (!(h10 instanceof int[])) { throw new NumberFormatException("Couldn't find a integer value"); } int[] iArr = (int[]) h10; if (iArr.length == 1) { return iArr[0]; } throw new NumberFormatException("There are more than one component"); } public String g(ByteOrder byteOrder) { Object h10 = h(byteOrder); if (h10 == null) { return null; } if (h10 instanceof String) { return (String) h10; } StringBuilder sb2 = new StringBuilder(); int i10 = 0; if (h10 instanceof long[]) { long[] jArr = (long[]) h10; while (i10 < jArr.length) { sb2.append(jArr[i10]); i10++; if (i10 != jArr.length) { sb2.append(","); } } return sb2.toString(); } if (h10 instanceof int[]) { int[] iArr = (int[]) h10; while (i10 < iArr.length) { sb2.append(iArr[i10]); i10++; if (i10 != iArr.length) { sb2.append(","); } } return sb2.toString(); } if (h10 instanceof double[]) { double[] dArr = (double[]) h10; while (i10 < dArr.length) { sb2.append(dArr[i10]); i10++; if (i10 != dArr.length) { sb2.append(","); } } return sb2.toString(); } if (!(h10 instanceof e[])) { return null; } e[] eVarArr = (e[]) h10; while (i10 < eVarArr.length) { sb2.append(eVarArr[i10].f43625a); sb2.append('/'); sb2.append(eVarArr[i10].f43626b); i10++; if (i10 != eVarArr.length) { sb2.append(","); } } return sb2.toString(); } public Object h(ByteOrder byteOrder) { b bVar; InputStream inputStream; byte b10; byte[] bArr; InputStream inputStream2 = null; try { try { bVar = new b(this.f43620d); try { bVar.f43614b = byteOrder; boolean z10 = true; int i10 = 0; switch (this.f43617a) { case 1: case 6: byte[] bArr2 = this.f43620d; if (bArr2.length != 1 || bArr2[0] < 0 || bArr2[0] > 1) { String str = new String(bArr2, a.O); try { bVar.close(); } catch (IOException e10) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e10); } return str; } String str2 = new String(new char[]{(char) (bArr2[0] + 48)}); try { bVar.close(); } catch (IOException e11) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e11); } return str2; case 2: case 7: if (this.f43618b >= a.G.length) { int i11 = 0; while (true) { bArr = a.G; if (i11 < bArr.length) { if (this.f43620d[i11] != bArr[i11]) { z10 = false; } else { i11++; } } } if (z10) { i10 = bArr.length; } } StringBuilder sb2 = new StringBuilder(); while (i10 < this.f43618b && (b10 = this.f43620d[i10]) != 0) { if (b10 >= 32) { sb2.append((char) b10); } else { sb2.append('?'); } i10++; } String sb3 = sb2.toString(); try { bVar.close(); } catch (IOException e12) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e12); } return sb3; case 3: int[] iArr = new int[this.f43618b]; while (i10 < this.f43618b) { iArr[i10] = bVar.readUnsignedShort(); i10++; } try { bVar.close(); } catch (IOException e13) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e13); } return iArr; case 4: long[] jArr = new long[this.f43618b]; while (i10 < this.f43618b) { jArr[i10] = bVar.a(); i10++; } try { bVar.close(); } catch (IOException e14) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e14); } return jArr; case 5: e[] eVarArr = new e[this.f43618b]; while (i10 < this.f43618b) { eVarArr[i10] = new e(bVar.a(), bVar.a()); i10++; } try { bVar.close(); } catch (IOException e15) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e15); } return eVarArr; case 8: int[] iArr2 = new int[this.f43618b]; while (i10 < this.f43618b) { iArr2[i10] = bVar.readShort(); i10++; } try { bVar.close(); } catch (IOException e16) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e16); } return iArr2; case 9: int[] iArr3 = new int[this.f43618b]; while (i10 < this.f43618b) { iArr3[i10] = bVar.readInt(); i10++; } try { bVar.close(); } catch (IOException e17) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e17); } return iArr3; case 10: e[] eVarArr2 = new e[this.f43618b]; while (i10 < this.f43618b) { eVarArr2[i10] = new e(bVar.readInt(), bVar.readInt()); i10++; } try { bVar.close(); } catch (IOException e18) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e18); } return eVarArr2; case 11: double[] dArr = new double[this.f43618b]; while (i10 < this.f43618b) { dArr[i10] = bVar.readFloat(); i10++; } try { bVar.close(); } catch (IOException e19) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e19); } return dArr; case 12: double[] dArr2 = new double[this.f43618b]; while (i10 < this.f43618b) { dArr2[i10] = bVar.readDouble(); i10++; } try { bVar.close(); } catch (IOException e20) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e20); } return dArr2; default: try { bVar.close(); } catch (IOException e21) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e21); } return null; } } catch (IOException e22) { e = e22; Log.w("ExifInterface", "IOException occurred during reading a value", e); if (bVar != null) { try { bVar.close(); } catch (IOException e23) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e23); } } return null; } } catch (Throwable th2) { th = th2; inputStream2 = inputStream; if (inputStream2 != null) { try { inputStream2.close(); } catch (IOException e24) { Log.e("ExifInterface", "IOException occurred while closing InputStream", e24); } } throw th; } } catch (IOException e25) { e = e25; bVar = null; } catch (Throwable th3) { th = th3; if (inputStream2 != null) { } throw th; } } public String toString() { StringBuilder a10 = android.support.v4.media.b.a("("); a10.append(a.E[this.f43617a]); a10.append(", data length:"); return w.f.a(a10, this.f43620d.length, ")"); } } public static class d { public final int f43621a; public final String f43622b; public final int f43623c; public final int f43624d; public d(String str, int i10, int i11) { this.f43622b = str; this.f43621a = i10; this.f43623c = i11; this.f43624d = -1; } public d(String str, int i10, int i11, int i12) { this.f43622b = str; this.f43621a = i10; this.f43623c = i11; this.f43624d = i12; } } public static class e { public final long f43625a; public final long f43626b; public e(long j10, long j11) { if (j11 == 0) { this.f43625a = 0L; this.f43626b = 1L; } else { this.f43625a = j10; this.f43626b = j11; } } public String toString() { return this.f43625a + "/" + this.f43626b; } } public static class f extends b { public f(InputStream inputStream) { super(inputStream, ByteOrder.BIG_ENDIAN); if (!inputStream.markSupported()) { throw new IllegalArgumentException("Cannot create SeekableByteOrderedDataInputStream with stream that does not support mark/reset"); } this.f43613a.mark(Integer.MAX_VALUE); } public f(byte[] bArr) { super(bArr); this.f43613a.mark(Integer.MAX_VALUE); } public void c(long j10) { int i10 = this.f43615c; if (i10 > j10) { this.f43615c = 0; this.f43613a.reset(); } else { j10 -= i10; } b((int) j10); } } static { "VP8X".getBytes(Charset.defaultCharset()); "VP8L".getBytes(Charset.defaultCharset()); "VP8 ".getBytes(Charset.defaultCharset()); "ANIM".getBytes(Charset.defaultCharset()); "ANMF".getBytes(Charset.defaultCharset()); E = new String[]{"", "BYTE", "STRING", "USHORT", "ULONG", "URATIONAL", "SBYTE", "UNDEFINED", "SSHORT", "SLONG", "SRATIONAL", "SINGLE", "DOUBLE", "IFD"}; F = new int[]{0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 1}; G = new byte[]{65, 83, 67, 73, 73, 0, 0, 0}; d[] dVarArr = {new d("NewSubfileType", 254, 4), new d("SubfileType", 255, 4), new d("ImageWidth", 256, 3, 4), new d("ImageLength", 257, 3, 4), new d("BitsPerSample", 258, 3), new d("Compression", 259, 3), new d("PhotometricInterpretation", 262, 3), new d("ImageDescription", 270, 2), new d("Make", 271, 2), new d("Model", 272, 2), new d("StripOffsets", 273, 3, 4), new d("Orientation", 274, 3), new d("SamplesPerPixel", 277, 3), new d("RowsPerStrip", 278, 3, 4), new d("StripByteCounts", 279, 3, 4), new d("XResolution", 282, 5), new d("YResolution", 283, 5), new d("PlanarConfiguration", 284, 3), new d("ResolutionUnit", 296, 3), new d("TransferFunction", 301, 3), new d("Software", 305, 2), new d("DateTime", 306, 2), new d("Artist", 315, 2), new d("WhitePoint", 318, 5), new d("PrimaryChromaticities", 319, 5), new d("SubIFDPointer", 330, 4), new d("JPEGInterchangeFormat", 513, 4), new d("JPEGInterchangeFormatLength", 514, 4), new d("YCbCrCoefficients", 529, 5), new d("YCbCrSubSampling", 530, 3), new d("YCbCrPositioning", 531, 3), new d("ReferenceBlackWhite", 532, 5), new d("Copyright", 33432, 2), new d("ExifIFDPointer", 34665, 4), new d("GPSInfoIFDPointer", 34853, 4), new d("SensorTopBorder", 4, 4), new d("SensorLeftBorder", 5, 4), new d("SensorBottomBorder", 6, 4), new d("SensorRightBorder", 7, 4), new d("ISO", 23, 3), new d("JpgFromRaw", 46, 7), new d("Xmp", 700, 1)}; d[] dVarArr2 = {new d("ExposureTime", 33434, 5), new d("FNumber", 33437, 5), new d("ExposureProgram", 34850, 3), new d("SpectralSensitivity", 34852, 2), new d("PhotographicSensitivity", 34855, 3), new d("OECF", 34856, 7), new d("SensitivityType", 34864, 3), new d("StandardOutputSensitivity", 34865, 4), new d("RecommendedExposureIndex", 34866, 4), new d("ISOSpeed", 34867, 4), new d("ISOSpeedLatitudeyyy", 34868, 4), new d("ISOSpeedLatitudezzz", 34869, 4), new d("ExifVersion", 36864, 2), new d("DateTimeOriginal", 36867, 2), new d("DateTimeDigitized", 36868, 2), new d("OffsetTime", 36880, 2), new d("OffsetTimeOriginal", 36881, 2), new d("OffsetTimeDigitized", 36882, 2), new d("ComponentsConfiguration", 37121, 7), new d("CompressedBitsPerPixel", 37122, 5), new d("ShutterSpeedValue", 37377, 10), new d("ApertureValue", 37378, 5), new d("BrightnessValue", 37379, 10), new d("ExposureBiasValue", 37380, 10), new d("MaxApertureValue", 37381, 5), new d("SubjectDistance", 37382, 5), new d("MeteringMode", 37383, 3), new d("LightSource", 37384, 3), new d("Flash", 37385, 3), new d("FocalLength", 37386, 5), new d("SubjectArea", 37396, 3), new d("MakerNote", 37500, 7), new d("UserComment", 37510, 7), new d("SubSecTime", 37520, 2), new d("SubSecTimeOriginal", 37521, 2), new d("SubSecTimeDigitized", 37522, 2), new d("FlashpixVersion", 40960, 7), new d("ColorSpace", 40961, 3), new d("PixelXDimension", 40962, 3, 4), new d("PixelYDimension", 40963, 3, 4), new d("RelatedSoundFile", 40964, 2), new d("InteroperabilityIFDPointer", 40965, 4), new d("FlashEnergy", 41483, 5), new d("SpatialFrequencyResponse", 41484, 7), new d("FocalPlaneXResolution", 41486, 5), new d("FocalPlaneYResolution", 41487, 5), new d("FocalPlaneResolutionUnit", 41488, 3), new d("SubjectLocation", 41492, 3), new d("ExposureIndex", 41493, 5), new d("SensingMethod", 41495, 3), new d("FileSource", 41728, 7), new d("SceneType", 41729, 7), new d("CFAPattern", 41730, 7), new d("CustomRendered", 41985, 3), new d("ExposureMode", 41986, 3), new d("WhiteBalance", 41987, 3), new d("DigitalZoomRatio", 41988, 5), new d("FocalLengthIn35mmFilm", 41989, 3), new d("SceneCaptureType", 41990, 3), new d("GainControl", 41991, 3), new d("Contrast", 41992, 3), new d("Saturation", 41993, 3), new d("Sharpness", 41994, 3), new d("DeviceSettingDescription", 41995, 7), new d("SubjectDistanceRange", 41996, 3), new d("ImageUniqueID", 42016, 2), new d("CameraOwnerName", 42032, 2), new d("BodySerialNumber", 42033, 2), new d("LensSpecification", 42034, 5), new d("LensMake", 42035, 2), new d("LensModel", 42036, 2), new d("Gamma", 42240, 5), new d("DNGVersion", 50706, 1), new d("DefaultCropSize", 50720, 3, 4)}; d[] dVarArr3 = {new d("GPSVersionID", 0, 1), new d("GPSLatitudeRef", 1, 2), new d("GPSLatitude", 2, 5, 10), new d("GPSLongitudeRef", 3, 2), new d("GPSLongitude", 4, 5, 10), new d("GPSAltitudeRef", 5, 1), new d("GPSAltitude", 6, 5), new d("GPSTimeStamp", 7, 5), new d("GPSSatellites", 8, 2), new d("GPSStatus", 9, 2), new d("GPSMeasureMode", 10, 2), new d("GPSDOP", 11, 5), new d("GPSSpeedRef", 12, 2), new d("GPSSpeed", 13, 5), new d("GPSTrackRef", 14, 2), new d("GPSTrack", 15, 5), new d("GPSImgDirectionRef", 16, 2), new d("GPSImgDirection", 17, 5), new d("GPSMapDatum", 18, 2), new d("GPSDestLatitudeRef", 19, 2), new d("GPSDestLatitude", 20, 5), new d("GPSDestLongitudeRef", 21, 2), new d("GPSDestLongitude", 22, 5), new d("GPSDestBearingRef", 23, 2), new d("GPSDestBearing", 24, 5), new d("GPSDestDistanceRef", 25, 2), new d("GPSDestDistance", 26, 5), new d("GPSProcessingMethod", 27, 7), new d("GPSAreaInformation", 28, 7), new d("GPSDateStamp", 29, 2), new d("GPSDifferential", 30, 3), new d("GPSHPositioningError", 31, 5)}; d[] dVarArr4 = {new d("InteroperabilityIndex", 1, 2)}; d[] dVarArr5 = {new d("NewSubfileType", 254, 4), new d("SubfileType", 255, 4), new d("ThumbnailImageWidth", 256, 3, 4), new d("ThumbnailImageLength", 257, 3, 4), new d("BitsPerSample", 258, 3), new d("Compression", 259, 3), new d("PhotometricInterpretation", 262, 3), new d("ImageDescription", 270, 2), new d("Make", 271, 2), new d("Model", 272, 2), new d("StripOffsets", 273, 3, 4), new d("ThumbnailOrientation", 274, 3), new d("SamplesPerPixel", 277, 3), new d("RowsPerStrip", 278, 3, 4), new d("StripByteCounts", 279, 3, 4), new d("XResolution", 282, 5), new d("YResolution", 283, 5), new d("PlanarConfiguration", 284, 3), new d("ResolutionUnit", 296, 3), new d("TransferFunction", 301, 3), new d("Software", 305, 2), new d("DateTime", 306, 2), new d("Artist", 315, 2), new d("WhitePoint", 318, 5), new d("PrimaryChromaticities", 319, 5), new d("SubIFDPointer", 330, 4), new d("JPEGInterchangeFormat", 513, 4), new d("JPEGInterchangeFormatLength", 514, 4), new d("YCbCrCoefficients", 529, 5), new d("YCbCrSubSampling", 530, 3), new d("YCbCrPositioning", 531, 3), new d("ReferenceBlackWhite", 532, 5), new d("Xmp", 700, 1), new d("Copyright", 33432, 2), new d("ExifIFDPointer", 34665, 4), new d("GPSInfoIFDPointer", 34853, 4), new d("DNGVersion", 50706, 1), new d("DefaultCropSize", 50720, 3, 4)}; H = new d("StripOffsets", 273, 3); I = new d[][]{dVarArr, dVarArr2, dVarArr3, dVarArr4, dVarArr5, dVarArr, new d[]{new d("ThumbnailImage", 256, 7), new d("CameraSettingsIFDPointer", 8224, 4), new d("ImageProcessingIFDPointer", 8256, 4)}, new d[]{new d("PreviewImageStart", 257, 4), new d("PreviewImageLength", 258, 4)}, new d[]{new d("AspectFrame", 4371, 3)}, new d[]{new d("ColorSpace", 55, 3)}}; J = new d[]{new d("SubIFDPointer", 330, 4), new d("ExifIFDPointer", 34665, 4), new d("GPSInfoIFDPointer", 34853, 4), new d("InteroperabilityIFDPointer", 40965, 4), new d("CameraSettingsIFDPointer", 8224, 1), new d("ImageProcessingIFDPointer", 8256, 1)}; K = new HashMap[10]; L = new HashMap[10]; M = new HashSet<>(Arrays.asList("FNumber", "DigitalZoomRatio", "ExposureTime", "SubjectDistance", "GPSTimeStamp")); N = new HashMap<>(); Charset forName = Charset.forName("US-ASCII"); O = forName; P = "Exif\u0000\u0000".getBytes(forName); Q = "http://ns.adobe.com/xap/1.0/\u0000".getBytes(forName); Locale locale = Locale.US; new SimpleDateFormat("yyyy:MM:dd HH:mm:ss", locale).setTimeZone(TimeZone.getTimeZone("UTC")); new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", locale).setTimeZone(TimeZone.getTimeZone("UTC")); int i10 = 0; while (true) { ExifInterface.ExifTag[][] exifTagArr = I; if (i10 >= exifTagArr.length) { HashMap<Integer, Integer> hashMap = N; d[] dVarArr6 = J; hashMap.put(Integer.valueOf(dVarArr6[0].f43621a), 5); hashMap.put(Integer.valueOf(dVarArr6[1].f43621a), 1); hashMap.put(Integer.valueOf(dVarArr6[2].f43621a), 2); hashMap.put(Integer.valueOf(dVarArr6[3].f43621a), 3); hashMap.put(Integer.valueOf(dVarArr6[4].f43621a), 7); hashMap.put(Integer.valueOf(dVarArr6[5].f43621a), 8); Pattern.compile(".*[1-9].*"); Pattern.compile("^(\\d{2}):(\\d{2}):(\\d{2})$"); Pattern.compile("^(\\d{4}):(\\d{2}):(\\d{2})\\s(\\d{2}):(\\d{2}):(\\d{2})$"); Pattern.compile("^(\\d{4})-(\\d{2})-(\\d{2})\\s(\\d{2}):(\\d{2}):(\\d{2})$"); return; } K[i10] = new HashMap<>(); L[i10] = new HashMap<>(); for (ExifInterface.ExifTag exifTag : exifTagArr[i10]) { K[i10].put(Integer.valueOf(exifTag.f43621a), exifTag); L[i10].put(exifTag.f43622b, exifTag); } i10++; } } public a(InputStream inputStream) { boolean z10; d[][] dVarArr = I; this.f43601e = new HashMap[dVarArr.length]; this.f43602f = new HashSet(dVarArr.length); this.f43603g = ByteOrder.BIG_ENDIAN; if (inputStream instanceof AssetManager.AssetInputStream) { this.f43598b = (AssetManager.AssetInputStream) inputStream; this.f43597a = null; } else { if (inputStream instanceof FileInputStream) { FileInputStream fileInputStream = (FileInputStream) inputStream; try { b.a.c(fileInputStream.getFD(), 0L, OsConstants.SEEK_CUR); z10 = true; } catch (Exception unused) { if (f43583m) { Log.d("ExifInterface", "The file descriptor for the given input is not seekable"); } z10 = false; } if (z10) { this.f43598b = null; this.f43597a = fileInputStream.getFD(); } } this.f43598b = null; this.f43597a = null; } for (int i10 = 0; i10 < I.length; i10++) { try { try { this.f43601e[i10] = new HashMap<>(); } finally { a(); if (f43583m) { r(); } } } catch (IOException | UnsupportedOperationException e10) { boolean z11 = f43583m; if (z11) { Log.w("ExifInterface", "Invalid image: ExifInterface got an unsupported image format file(ExifInterface supports JPEG and some RAW image formats only) or a corrupted JPEG file to ExifInterface.", e10); } a(); if (!z11) { return; } } } if (!this.f43600d) { BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream, 5000); this.f43599c = g(bufferedInputStream); inputStream = bufferedInputStream; } int i11 = this.f43599c; if ((i11 == 4 || i11 == 9 || i11 == 13 || i11 == 14) ? false : true) { f fVar = new f(inputStream); if (this.f43600d) { m(fVar); } else { int i12 = this.f43599c; if (i12 == 12) { e(fVar); } else if (i12 == 7) { h(fVar); } else if (i12 == 10) { l(fVar); } else { k(fVar); } } fVar.c(this.f43605i); w(fVar); } else { b bVar = new b(inputStream, ByteOrder.BIG_ENDIAN); int i13 = this.f43599c; if (i13 == 4) { f(bVar, 0, 0); } else if (i13 == 13) { i(bVar); } else if (i13 == 9) { j(bVar); } else if (i13 == 14) { n(bVar); } } } public final void a() { String b10 = b("DateTimeOriginal"); if (b10 != null && b("DateTime") == null) { this.f43601e[0].put("DateTime", c.a(b10)); } if (b("ImageWidth") == null) { this.f43601e[0].put("ImageWidth", c.b(0L, this.f43603g)); } if (b("ImageLength") == null) { this.f43601e[0].put("ImageLength", c.b(0L, this.f43603g)); } if (b("Orientation") == null) { this.f43601e[0].put("Orientation", c.b(0L, this.f43603g)); } if (b("LightSource") == null) { this.f43601e[1].put("LightSource", c.b(0L, this.f43603g)); } } public String b(String str) { c d10 = d(str); if (d10 != null) { if (!M.contains(str)) { return d10.g(this.f43603g); } if (str.equals("GPSTimeStamp")) { int i10 = d10.f43617a; if (i10 != 5 && i10 != 10) { StringBuilder a10 = android.support.v4.media.b.a("GPS Timestamp format is not rational. format="); a10.append(d10.f43617a); Log.w("ExifInterface", a10.toString()); return null; } e[] eVarArr = (e[]) d10.h(this.f43603g); if (eVarArr != null && eVarArr.length == 3) { return String.format("%02d:%02d:%02d", Integer.valueOf((int) (((float) eVarArr[0].f43625a) / ((float) eVarArr[0].f43626b))), Integer.valueOf((int) (((float) eVarArr[1].f43625a) / ((float) eVarArr[1].f43626b))), Integer.valueOf((int) (((float) eVarArr[2].f43625a) / ((float) eVarArr[2].f43626b)))); } StringBuilder a11 = android.support.v4.media.b.a("Invalid GPS Timestamp array. array="); a11.append(Arrays.toString(eVarArr)); Log.w("ExifInterface", a11.toString()); return null; } try { return Double.toString(d10.e(this.f43603g)); } catch (NumberFormatException unused) { } } return null; } public int c(String str, int i10) { c d10 = d(str); if (d10 == null) { return i10; } try { return d10.f(this.f43603g); } catch (NumberFormatException unused) { return i10; } } public final c d(String str) { if ("ISOSpeedRatings".equals(str)) { if (f43583m) { Log.d("ExifInterface", "getExifAttribute: Replacing TAG_ISO_SPEED_RATINGS with TAG_PHOTOGRAPHIC_SENSITIVITY."); } str = "PhotographicSensitivity"; } for (int i10 = 0; i10 < I.length; i10++) { c cVar = this.f43601e[i10].get(str); if (cVar != null) { return cVar; } } return null; } public final void e(f fVar) { String str; String str2; if (Build.VERSION.SDK_INT < 28) { throw new UnsupportedOperationException("Reading EXIF from HEIF files is supported from SDK 28 and above"); } MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever(); try { try { b.C0296b.a(mediaMetadataRetriever, new C0295a(this, fVar)); String extractMetadata = mediaMetadataRetriever.extractMetadata(33); String extractMetadata2 = mediaMetadataRetriever.extractMetadata(34); String extractMetadata3 = mediaMetadataRetriever.extractMetadata(26); String extractMetadata4 = mediaMetadataRetriever.extractMetadata(17); String str3 = null; if ("yes".equals(extractMetadata3)) { str3 = mediaMetadataRetriever.extractMetadata(29); str = mediaMetadataRetriever.extractMetadata(30); str2 = mediaMetadataRetriever.extractMetadata(31); } else if ("yes".equals(extractMetadata4)) { str3 = mediaMetadataRetriever.extractMetadata(18); str = mediaMetadataRetriever.extractMetadata(19); str2 = mediaMetadataRetriever.extractMetadata(24); } else { str = null; str2 = null; } if (str3 != null) { this.f43601e[0].put("ImageWidth", c.d(Integer.parseInt(str3), this.f43603g)); } if (str != null) { this.f43601e[0].put("ImageLength", c.d(Integer.parseInt(str), this.f43603g)); } if (str2 != null) { int i10 = 1; int parseInt = Integer.parseInt(str2); if (parseInt == 90) { i10 = 6; } else if (parseInt == 180) { i10 = 3; } else if (parseInt == 270) { i10 = 8; } this.f43601e[0].put("Orientation", c.d(i10, this.f43603g)); } if (extractMetadata != null && extractMetadata2 != null) { int parseInt2 = Integer.parseInt(extractMetadata); int parseInt3 = Integer.parseInt(extractMetadata2); if (parseInt3 <= 6) { throw new IOException("Invalid exif length"); } fVar.c(parseInt2); byte[] bArr = new byte[6]; if (fVar.read(bArr) != 6) { throw new IOException("Can't read identifier"); } int i11 = parseInt2 + 6; int i12 = parseInt3 - 6; if (!Arrays.equals(bArr, P)) { throw new IOException("Invalid identifier"); } byte[] bArr2 = new byte[i12]; if (fVar.read(bArr2) != i12) { throw new IOException("Can't read exif"); } this.f43605i = i11; t(bArr2, 0); } if (f43583m) { Log.d("ExifInterface", "Heif meta: " + str3 + "x" + str + ", rotation " + str2); } } catch (RuntimeException unused) { throw new UnsupportedOperationException("Failed to read EXIF from HEIF file. Given stream is either malformed or unsupported."); } } finally { mediaMetadataRetriever.release(); } } public final void f(b bVar, int i10, int i11) { String str; String str2 = "ExifInterface"; if (f43583m) { Log.d("ExifInterface", "getJpegAttributes starting with: " + bVar); } bVar.f43614b = ByteOrder.BIG_ENDIAN; byte readByte = bVar.readByte(); byte b10 = -1; if (readByte != -1) { StringBuilder a10 = android.support.v4.media.b.a("Invalid marker: "); a10.append(Integer.toHexString(readByte & 255)); throw new IOException(a10.toString()); } if (bVar.readByte() != -40) { StringBuilder a11 = android.support.v4.media.b.a("Invalid marker: "); a11.append(Integer.toHexString(readByte & 255)); throw new IOException(a11.toString()); } int i12 = 2; int i13 = 2; while (true) { byte readByte2 = bVar.readByte(); if (readByte2 != b10) { StringBuilder a12 = android.support.v4.media.b.a("Invalid marker:"); a12.append(Integer.toHexString(readByte2 & 255)); throw new IOException(a12.toString()); } int i14 = i13 + 1; byte readByte3 = bVar.readByte(); boolean z10 = f43583m; if (z10) { StringBuilder a13 = android.support.v4.media.b.a("Found JPEG segment indicator: "); a13.append(Integer.toHexString(readByte3 & 255)); Log.d(str2, a13.toString()); } int i15 = i14 + 1; if (readByte3 != -39 && readByte3 != -38) { int readUnsignedShort = bVar.readUnsignedShort() - i12; int i16 = i15 + i12; if (z10) { StringBuilder a14 = android.support.v4.media.b.a("JPEG segment: "); a14.append(Integer.toHexString(readByte3 & 255)); a14.append(" (length: "); a14.append(readUnsignedShort + 2); a14.append(")"); Log.d(str2, a14.toString()); } if (readUnsignedShort < 0) { throw new IOException("Invalid length"); } int i17 = 0; if (readByte3 == -31) { byte[] bArr = new byte[readUnsignedShort]; bVar.f43615c += readUnsignedShort; bVar.f43613a.readFully(bArr); int i18 = i16 + readUnsignedShort; byte[] bArr2 = P; if (w0.b.c(bArr, bArr2)) { byte[] copyOfRange = Arrays.copyOfRange(bArr, bArr2.length, readUnsignedShort); this.f43605i = i10 + i16 + bArr2.length; t(copyOfRange, i11); w(new b(copyOfRange)); } else { byte[] bArr3 = Q; if (w0.b.c(bArr, bArr3)) { int length = i16 + bArr3.length; byte[] copyOfRange2 = Arrays.copyOfRange(bArr, bArr3.length, readUnsignedShort); if (b("Xmp") == null) { str = str2; this.f43601e[0].put("Xmp", new c(1, copyOfRange2.length, length, copyOfRange2)); i16 = i18; i17 = 0; } } } str = str2; i16 = i18; i17 = 0; } else if (readByte3 != -2) { switch (readByte3) { case -64: case -63: case -62: case -61: break; default: switch (readByte3) { case -59: case -58: case -57: break; default: switch (readByte3) { case -55: case -54: case -53: break; default: switch (readByte3) { } } } } bVar.b(1); this.f43601e[i11].put(i11 != 4 ? "ImageLength" : "ThumbnailImageLength", c.b(bVar.readUnsignedShort(), this.f43603g)); this.f43601e[i11].put(i11 != 4 ? "ImageWidth" : "ThumbnailImageWidth", c.b(bVar.readUnsignedShort(), this.f43603g)); readUnsignedShort -= 5; str = str2; i17 = readUnsignedShort; } else { byte[] bArr4 = new byte[readUnsignedShort]; if (bVar.read(bArr4) != readUnsignedShort) { throw new IOException("Invalid exif"); } if (b("UserComment") == null) { this.f43601e[1].put("UserComment", c.a(new String(bArr4, O))); } str = str2; } if (i17 < 0) { throw new IOException("Invalid length"); } bVar.b(i17); i13 = i16 + i17; i12 = 2; b10 = -1; str2 = str; } } } public final int g(BufferedInputStream bufferedInputStream) { boolean z10; boolean z11; b bVar; b bVar2; boolean z12; b bVar3; b bVar4; boolean z13; b bVar5; b bVar6; boolean z14; boolean z15; boolean z16; bufferedInputStream.mark(5000); byte[] bArr = new byte[5000]; bufferedInputStream.read(bArr); bufferedInputStream.reset(); int i10 = 0; while (true) { byte[] bArr2 = f43588r; if (i10 >= bArr2.length) { z10 = true; break; } if (bArr[i10] != bArr2[i10]) { z10 = false; break; } i10++; } if (z10) { return 4; } byte[] bytes = "FUJIFILMCCD-RAW".getBytes(Charset.defaultCharset()); int i11 = 0; while (true) { if (i11 >= bytes.length) { z11 = true; break; } if (bArr[i11] != bytes[i11]) { z11 = false; break; } i11++; } if (z11) { return 9; } try { bVar2 = new b(bArr); try { long readInt = bVar2.readInt(); byte[] bArr3 = new byte[4]; bVar2.read(bArr3); if (Arrays.equals(bArr3, f43589s)) { long j10 = 16; if (readInt == 1) { readInt = bVar2.readLong(); if (readInt < 16) { } } else { j10 = 8; } long j11 = 5000; if (readInt > j11) { readInt = j11; } long j12 = readInt - j10; if (j12 >= 8) { byte[] bArr4 = new byte[4]; boolean z17 = false; boolean z18 = false; for (long j13 = 0; j13 < j12 / 4 && bVar2.read(bArr4) == 4; j13++) { if (j13 != 1) { if (Arrays.equals(bArr4, f43590t)) { z17 = true; } else if (Arrays.equals(bArr4, f43591u)) { z18 = true; } if (z17 && z18) { bVar2.close(); z12 = true; break; } } } } } } catch (Exception e10) { e = e10; try { if (f43583m) { Log.d("ExifInterface", "Exception parsing HEIF file type box.", e); } } catch (Throwable th2) { th = th2; bVar = bVar2; bVar2 = bVar; if (bVar2 != null) { bVar2.close(); } throw th; } } catch (Throwable th3) { th = th3; if (bVar2 != null) { } throw th; } } catch (Exception e11) { e = e11; bVar2 = null; } catch (Throwable th4) { th = th4; bVar = null; bVar2 = bVar; if (bVar2 != null) { } throw th; } bVar2.close(); z12 = false; if (z12) { return 12; } try { bVar4 = new b(bArr); try { ByteOrder s4 = s(bVar4); this.f43603g = s4; bVar4.f43614b = s4; short readShort = bVar4.readShort(); z13 = readShort == 20306 || readShort == 21330; bVar4.close(); } catch (Exception unused) { if (bVar4 != null) { bVar4.close(); } z13 = false; if (!z13) { } } catch (Throwable th5) { th = th5; bVar3 = bVar4; if (bVar3 != null) { bVar3.close(); } throw th; } } catch (Exception unused2) { bVar4 = null; } catch (Throwable th6) { th = th6; bVar3 = null; } if (!z13) { return 7; } try { b bVar7 = new b(bArr); try { ByteOrder s10 = s(bVar7); this.f43603g = s10; bVar7.f43614b = s10; z14 = bVar7.readShort() == 85; bVar7.close(); } catch (Exception unused3) { bVar6 = bVar7; if (bVar6 != null) { bVar6.close(); } z14 = false; if (!z14) { } } catch (Throwable th7) { th = th7; bVar5 = bVar7; if (bVar5 != null) { bVar5.close(); } throw th; } } catch (Exception unused4) { bVar6 = null; } catch (Throwable th8) { th = th8; bVar5 = null; } if (!z14) { return 10; } int i12 = 0; while (true) { byte[] bArr5 = f43594x; if (i12 >= bArr5.length) { z15 = true; break; } if (bArr[i12] != bArr5[i12]) { z15 = false; break; } i12++; } if (z15) { return 13; } int i13 = 0; while (true) { byte[] bArr6 = B; if (i13 >= bArr6.length) { int i14 = 0; while (true) { byte[] bArr7 = C; if (i14 >= bArr7.length) { z16 = true; break; } if (bArr[B.length + i14 + 4] != bArr7[i14]) { break; } i14++; } } else { if (bArr[i13] != bArr6[i13]) { break; } i13++; } } z16 = false; return z16 ? 14 : 0; } public final void h(f fVar) { k(fVar); c cVar = this.f43601e[1].get("MakerNote"); if (cVar != null) { f fVar2 = new f(cVar.f43620d); fVar2.f43614b = this.f43603g; byte[] bArr = f43592v; int length = bArr.length; byte[] bArr2 = new byte[length]; fVar2.f43615c += length; fVar2.f43613a.readFully(bArr2); fVar2.c(0L); byte[] bArr3 = f43593w; int length2 = bArr3.length; byte[] bArr4 = new byte[length2]; fVar2.f43615c += length2; fVar2.f43613a.readFully(bArr4); if (Arrays.equals(bArr2, bArr)) { fVar2.c(8L); } else if (Arrays.equals(bArr4, bArr3)) { fVar2.c(12L); } u(fVar2, 6); ExifInterface.ExifAttribute exifAttribute = (c) this.f43601e[7].get("PreviewImageStart"); ExifInterface.ExifAttribute exifAttribute2 = (c) this.f43601e[7].get("PreviewImageLength"); if (exifAttribute != null && exifAttribute2 != null) { this.f43601e[5].put("JPEGInterchangeFormat", exifAttribute); this.f43601e[5].put("JPEGInterchangeFormatLength", exifAttribute2); } c cVar2 = this.f43601e[8].get("AspectFrame"); if (cVar2 != null) { int[] iArr = (int[]) cVar2.h(this.f43603g); if (iArr == null || iArr.length != 4) { StringBuilder a10 = android.support.v4.media.b.a("Invalid aspect frame values. frame="); a10.append(Arrays.toString(iArr)); Log.w("ExifInterface", a10.toString()); } else { if (iArr[2] <= iArr[0] || iArr[3] <= iArr[1]) { return; } int i10 = (iArr[2] - iArr[0]) + 1; int i11 = (iArr[3] - iArr[1]) + 1; if (i10 < i11) { int i12 = i10 + i11; i11 = i12 - i11; i10 = i12 - i11; } ExifInterface.ExifAttribute d10 = c.d(i10, this.f43603g); ExifInterface.ExifAttribute d11 = c.d(i11, this.f43603g); this.f43601e[0].put("ImageWidth", d10); this.f43601e[0].put("ImageLength", d11); } } } } public final void i(b bVar) { if (f43583m) { Log.d("ExifInterface", "getPngAttributes starting with: " + bVar); } bVar.f43614b = ByteOrder.BIG_ENDIAN; byte[] bArr = f43594x; bVar.b(bArr.length); int length = bArr.length + 0; while (true) { try { int readInt = bVar.readInt(); int i10 = length + 4; byte[] bArr2 = new byte[4]; if (bVar.read(bArr2) != 4) { throw new IOException("Encountered invalid length while parsing PNG chunktype"); } int i11 = i10 + 4; if (i11 == 16 && !Arrays.equals(bArr2, f43596z)) { throw new IOException("Encountered invalid PNG file--IHDR chunk should appearas the first chunk"); } if (Arrays.equals(bArr2, A)) { return; } if (Arrays.equals(bArr2, f43595y)) { byte[] bArr3 = new byte[readInt]; if (bVar.read(bArr3) != readInt) { throw new IOException("Failed to read given length for given PNG chunk type: " + w0.b.a(bArr2)); } int readInt2 = bVar.readInt(); CRC32 crc32 = new CRC32(); crc32.update(bArr2); crc32.update(bArr3); if (((int) crc32.getValue()) == readInt2) { this.f43605i = i11; t(bArr3, 0); z(); w(new b(bArr3)); return; } throw new IOException("Encountered invalid CRC value for PNG-EXIF chunk.\n recorded CRC value: " + readInt2 + ", calculated CRC value: " + crc32.getValue()); } int i12 = readInt + 4; bVar.b(i12); length = i11 + i12; } catch (EOFException unused) { throw new IOException("Encountered corrupt PNG file."); } } } public final void j(b bVar) { boolean z10 = f43583m; if (z10) { Log.d("ExifInterface", "getRafAttributes starting with: " + bVar); } bVar.b(84); byte[] bArr = new byte[4]; byte[] bArr2 = new byte[4]; byte[] bArr3 = new byte[4]; bVar.read(bArr); bVar.read(bArr2); bVar.read(bArr3); int i10 = ByteBuffer.wrap(bArr).getInt(); int i11 = ByteBuffer.wrap(bArr2).getInt(); int i12 = ByteBuffer.wrap(bArr3).getInt(); byte[] bArr4 = new byte[i11]; bVar.b(i10 - bVar.f43615c); bVar.read(bArr4); f(new b(bArr4), i10, 5); bVar.b(i12 - bVar.f43615c); bVar.f43614b = ByteOrder.BIG_ENDIAN; int readInt = bVar.readInt(); if (z10) { Log.d("ExifInterface", "numberOfDirectoryEntry: " + readInt); } for (int i13 = 0; i13 < readInt; i13++) { int readUnsignedShort = bVar.readUnsignedShort(); int readUnsignedShort2 = bVar.readUnsignedShort(); if (readUnsignedShort == H.f43621a) { short readShort = bVar.readShort(); short readShort2 = bVar.readShort(); ExifInterface.ExifAttribute d10 = c.d(readShort, this.f43603g); ExifInterface.ExifAttribute d11 = c.d(readShort2, this.f43603g); this.f43601e[0].put("ImageLength", d10); this.f43601e[0].put("ImageWidth", d11); if (f43583m) { Log.d("ExifInterface", "Updated to length: " + ((int) readShort) + ", width: " + ((int) readShort2)); return; } return; } bVar.b(readUnsignedShort2); } } public final void k(f fVar) { c cVar; q(fVar); u(fVar, 0); y(fVar, 0); y(fVar, 5); y(fVar, 4); z(); if (this.f43599c != 8 || (cVar = this.f43601e[1].get("MakerNote")) == null) { return; } f fVar2 = new f(cVar.f43620d); fVar2.f43614b = this.f43603g; fVar2.b(6); u(fVar2, 9); ExifInterface.ExifAttribute exifAttribute = (c) this.f43601e[9].get("ColorSpace"); if (exifAttribute != null) { this.f43601e[1].put("ColorSpace", exifAttribute); } } public final void l(f fVar) { if (f43583m) { Log.d("ExifInterface", "getRw2Attributes starting with: " + fVar); } k(fVar); c cVar = this.f43601e[0].get("JpgFromRaw"); if (cVar != null) { f(new b(cVar.f43620d), (int) cVar.f43619c, 5); } ExifInterface.ExifAttribute exifAttribute = (c) this.f43601e[0].get("ISO"); c cVar2 = this.f43601e[1].get("PhotographicSensitivity"); if (exifAttribute == null || cVar2 != null) { return; } this.f43601e[1].put("PhotographicSensitivity", exifAttribute); } public final void m(f fVar) { byte[] bArr = P; fVar.b(bArr.length); int available = fVar.available(); byte[] bArr2 = new byte[available]; fVar.f43615c += available; fVar.f43613a.readFully(bArr2); this.f43605i = bArr.length; t(bArr2, 0); } public final void n(b bVar) { if (f43583m) { Log.d("ExifInterface", "getWebpAttributes starting with: " + bVar); } bVar.f43614b = ByteOrder.LITTLE_ENDIAN; bVar.b(B.length); int readInt = bVar.readInt() + 8; byte[] bArr = C; bVar.b(bArr.length); int length = bArr.length + 8; while (true) { try { byte[] bArr2 = new byte[4]; if (bVar.read(bArr2) != 4) { throw new IOException("Encountered invalid length while parsing WebP chunktype"); } int readInt2 = bVar.readInt(); int i10 = length + 4 + 4; if (Arrays.equals(D, bArr2)) { byte[] bArr3 = new byte[readInt2]; if (bVar.read(bArr3) == readInt2) { this.f43605i = i10; t(bArr3, 0); w(new b(bArr3)); return; } else { throw new IOException("Failed to read given length for given PNG chunk type: " + w0.b.a(bArr2)); } } if (readInt2 % 2 == 1) { readInt2++; } length = i10 + readInt2; if (length == readInt) { return; } if (length > readInt) { throw new IOException("Encountered WebP file with invalid chunk size"); } bVar.b(readInt2); } catch (EOFException unused) { throw new IOException("Encountered corrupt WebP file."); } } } public final void o(b bVar, HashMap hashMap) { c cVar = (c) hashMap.get("JPEGInterchangeFormat"); c cVar2 = (c) hashMap.get("JPEGInterchangeFormatLength"); if (cVar == null || cVar2 == null) { return; } int f10 = cVar.f(this.f43603g); int f11 = cVar2.f(this.f43603g); if (this.f43599c == 7) { f10 += this.f43606j; } if (f10 > 0 && f11 > 0 && this.f43598b == null && this.f43597a == null) { bVar.skip(f10); bVar.read(new byte[f11]); } if (f43583m) { Log.d("ExifInterface", "Setting thumbnail attributes with offset: " + f10 + ", length: " + f11); } } public final boolean p(HashMap hashMap) { c cVar = (c) hashMap.get("ImageLength"); c cVar2 = (c) hashMap.get("ImageWidth"); if (cVar == null || cVar2 == null) { return false; } return cVar.f(this.f43603g) <= 512 && cVar2.f(this.f43603g) <= 512; } public final void q(b bVar) { ByteOrder s4 = s(bVar); this.f43603g = s4; bVar.f43614b = s4; int readUnsignedShort = bVar.readUnsignedShort(); int i10 = this.f43599c; if (i10 != 7 && i10 != 10 && readUnsignedShort != 42) { StringBuilder a10 = android.support.v4.media.b.a("Invalid start code: "); a10.append(Integer.toHexString(readUnsignedShort)); throw new IOException(a10.toString()); } int readInt = bVar.readInt(); if (readInt < 8) { throw new IOException(android.support.v4.media.a.a("Invalid first Ifd offset: ", readInt)); } int i11 = readInt - 8; if (i11 > 0) { bVar.b(i11); } } public final void r() { for (int i10 = 0; i10 < this.f43601e.length; i10++) { StringBuilder a10 = w0.a("The size of tag group[", i10, "]: "); a10.append(this.f43601e[i10].size()); Log.d("ExifInterface", a10.toString()); for (Map.Entry<String, ExifInterface.ExifAttribute> entry : this.f43601e[i10].entrySet()) { c value = entry.getValue(); StringBuilder a11 = android.support.v4.media.b.a("tagName: "); a11.append(entry.getKey()); a11.append(", tagType: "); a11.append(value.toString()); a11.append(", tagValue: '"); a11.append(value.g(this.f43603g)); a11.append("'"); Log.d("ExifInterface", a11.toString()); } } } public final ByteOrder s(b bVar) { short readShort = bVar.readShort(); if (readShort == 18761) { if (f43583m) { Log.d("ExifInterface", "readExifSegment: Byte Align II"); } return ByteOrder.LITTLE_ENDIAN; } if (readShort == 19789) { if (f43583m) { Log.d("ExifInterface", "readExifSegment: Byte Align MM"); } return ByteOrder.BIG_ENDIAN; } StringBuilder a10 = android.support.v4.media.b.a("Invalid byte order: "); a10.append(Integer.toHexString(readShort)); throw new IOException(a10.toString()); } public final void t(byte[] bArr, int i10) { f fVar = new f(bArr); q(fVar); u(fVar, i10); } public final void u(f fVar, int i10) { short s4; short s10; boolean z10; long j10; boolean z11; int i11; long j11; int i12; int readUnsignedShort; int i13 = i10; this.f43602f.add(Integer.valueOf(fVar.f43615c)); short readShort = fVar.readShort(); if (f43583m) { Log.d("ExifInterface", "numberOfDirectoryEntry: " + ((int) readShort)); } if (readShort <= 0) { return; } char c10 = 0; short s11 = 0; while (s11 < readShort) { int readUnsignedShort2 = fVar.readUnsignedShort(); int readUnsignedShort3 = fVar.readUnsignedShort(); int readInt = fVar.readInt(); long j12 = fVar.f43615c + 4; d dVar = K[i13].get(Integer.valueOf(readUnsignedShort2)); boolean z12 = f43583m; if (z12) { Object[] objArr = new Object[5]; objArr[c10] = Integer.valueOf(i10); objArr[1] = Integer.valueOf(readUnsignedShort2); objArr[2] = dVar != null ? dVar.f43622b : null; objArr[3] = Integer.valueOf(readUnsignedShort3); objArr[4] = Integer.valueOf(readInt); Log.d("ExifInterface", String.format("ifdType: %d, tagNumber: %d, tagName: %s, dataFormat: %d, numberOfComponents: %d", objArr)); } if (dVar == null) { if (z12) { Log.d("ExifInterface", "Skip the tag entry since tag number is not defined: " + readUnsignedShort2); } s4 = readShort; } else { if (readUnsignedShort3 > 0) { if (readUnsignedShort3 < F.length) { int i14 = dVar.f43623c; if (i14 == 7 || readUnsignedShort3 == 7 || i14 == readUnsignedShort3 || (i11 = dVar.f43624d) == readUnsignedShort3) { s4 = readShort; } else { s4 = readShort; if (((i14 != 4 && i11 != 4) || readUnsignedShort3 != 3) && (((i14 != 9 && i11 != 9) || readUnsignedShort3 != 8) && ((i14 != 12 && i11 != 12) || readUnsignedShort3 != 11))) { z10 = false; if (!z10) { if (readUnsignedShort3 == 7) { readUnsignedShort3 = i14; } s10 = s11; j10 = r7[readUnsignedShort3] * readInt; if (j10 < 0 || j10 > 2147483647L) { if (z12) { Log.d("ExifInterface", "Skip the tag entry since the number of components is invalid: " + readInt); } z11 = false; if (z11) { fVar.c(j12); } else { if (j10 > 4) { int readInt2 = fVar.readInt(); if (z12) { StringBuilder sb2 = new StringBuilder(); j11 = j12; sb2.append("seek to data offset: "); sb2.append(readInt2); Log.d("ExifInterface", sb2.toString()); } else { j11 = j12; } if (this.f43599c == 7) { if ("MakerNote".equals(dVar.f43622b)) { this.f43606j = readInt2; } else if (i13 == 6 && "ThumbnailImage".equals(dVar.f43622b)) { this.f43607k = readInt2; this.f43608l = readInt; ExifInterface.ExifAttribute d10 = c.d(6, this.f43603g); ExifInterface.ExifAttribute b10 = c.b(this.f43607k, this.f43603g); i12 = readInt; ExifInterface.ExifAttribute b11 = c.b(this.f43608l, this.f43603g); this.f43601e[4].put("Compression", d10); this.f43601e[4].put("JPEGInterchangeFormat", b10); this.f43601e[4].put("JPEGInterchangeFormatLength", b11); fVar.c(readInt2); } } i12 = readInt; fVar.c(readInt2); } else { j11 = j12; i12 = readInt; } Integer num = N.get(Integer.valueOf(readUnsignedShort2)); if (z12) { Log.d("ExifInterface", "nextIfdType: " + num + " byteCount: " + j10); } if (num != null) { long j13 = -1; if (readUnsignedShort3 != 3) { if (readUnsignedShort3 == 4) { j13 = fVar.a(); } else if (readUnsignedShort3 == 8) { readUnsignedShort = fVar.readShort(); } else if (readUnsignedShort3 == 9 || readUnsignedShort3 == 13) { readUnsignedShort = fVar.readInt(); } if (z12) { Log.d("ExifInterface", String.format("Offset: %d, tagName: %s", Long.valueOf(j13), dVar.f43622b)); } if (j13 <= 0) { if (!this.f43602f.contains(Integer.valueOf((int) j13))) { fVar.c(j13); u(fVar, num.intValue()); } else if (z12) { Log.d("ExifInterface", "Skip jump into the IFD since it has already been read: IfdType " + num + " (at " + j13 + ")"); } } else if (z12) { Log.d("ExifInterface", "Skip jump into the IFD since its offset is invalid: " + j13); } fVar.c(j11); } else { readUnsignedShort = fVar.readUnsignedShort(); } j13 = readUnsignedShort; if (z12) { } if (j13 <= 0) { } fVar.c(j11); } else { long j14 = j11; int i15 = fVar.f43615c; int i16 = this.f43605i + i15; int i17 = (int) j10; byte[] bArr = new byte[i17]; fVar.f43615c = i15 + i17; fVar.f43613a.readFully(bArr); ExifInterface.ExifAttribute cVar = new c(readUnsignedShort3, i12, i16, bArr); this.f43601e[i10].put(dVar.f43622b, cVar); if ("DNGVersion".equals(dVar.f43622b)) { this.f43599c = 3; } if ((("Make".equals(dVar.f43622b) || "Model".equals(dVar.f43622b)) && cVar.g(this.f43603g).contains("PENTAX")) || ("Compression".equals(dVar.f43622b) && cVar.f(this.f43603g) == 65535)) { this.f43599c = 8; } if (fVar.f43615c != j14) { fVar.c(j14); } } } s11 = (short) (s10 + 1); c10 = 0; i13 = i10; readShort = s4; } else { z11 = true; if (z11) { } s11 = (short) (s10 + 1); c10 = 0; i13 = i10; readShort = s4; } } else if (z12) { StringBuilder a10 = android.support.v4.media.b.a("Skip the tag entry since data format ("); a10.append(E[readUnsignedShort3]); a10.append(") is unexpected for tag: "); a10.append(dVar.f43622b); Log.d("ExifInterface", a10.toString()); } } } z10 = true; if (!z10) { } } } s4 = readShort; s10 = s11; if (z12) { Log.d("ExifInterface", "Skip the tag entry since data format is invalid: " + readUnsignedShort3); } j10 = 0; z11 = false; if (z11) { } s11 = (short) (s10 + 1); c10 = 0; i13 = i10; readShort = s4; } s10 = s11; j10 = 0; z11 = false; if (z11) { } s11 = (short) (s10 + 1); c10 = 0; i13 = i10; readShort = s4; } int readInt3 = fVar.readInt(); boolean z13 = f43583m; if (z13) { Log.d("ExifInterface", String.format("nextIfdOffset: %d", Integer.valueOf(readInt3))); } long j15 = readInt3; if (j15 <= 0) { if (z13) { Log.d("ExifInterface", "Stop reading file since a wrong offset may cause an infinite loop: " + readInt3); return; } return; } if (this.f43602f.contains(Integer.valueOf(readInt3))) { if (z13) { Log.d("ExifInterface", "Stop reading file since re-reading an IFD may cause an infinite loop: " + readInt3); return; } return; } fVar.c(j15); if (this.f43601e[4].isEmpty()) { u(fVar, 4); } else if (this.f43601e[5].isEmpty()) { u(fVar, 5); } } public final void v(int i10, String str, String str2) { if (this.f43601e[i10].isEmpty() || this.f43601e[i10].get(str) == null) { return; } HashMap[] hashMapArr = this.f43601e; hashMapArr[i10].put(str2, hashMapArr[i10].get(str)); this.f43601e[i10].remove(str); } public final void w(b bVar) { boolean z10; c cVar; int f10; HashMap<String, ExifInterface.ExifAttribute> hashMap = this.f43601e[4]; c cVar2 = hashMap.get("Compression"); if (cVar2 == null) { o(bVar, hashMap); return; } int f11 = cVar2.f(this.f43603g); int i10 = 1; if (f11 != 1) { if (f11 == 6) { o(bVar, hashMap); return; } else if (f11 != 7) { return; } } c cVar3 = hashMap.get("BitsPerSample"); if (cVar3 != null) { int[] iArr = (int[]) cVar3.h(this.f43603g); int[] iArr2 = f43586p; if (Arrays.equals(iArr2, iArr) || (this.f43599c == 3 && (cVar = hashMap.get("PhotometricInterpretation")) != null && (((f10 = cVar.f(this.f43603g)) == 1 && Arrays.equals(iArr, f43587q)) || (f10 == 6 && Arrays.equals(iArr, iArr2))))) { z10 = true; if (z10) { return; } c cVar4 = hashMap.get("StripOffsets"); c cVar5 = hashMap.get("StripByteCounts"); if (cVar4 == null || cVar5 == null) { return; } long[] b10 = w0.b.b(cVar4.h(this.f43603g)); long[] b11 = w0.b.b(cVar5.h(this.f43603g)); if (b10 == null || b10.length == 0) { Log.w("ExifInterface", "stripOffsets should not be null or have zero length."); return; } if (b11 == null || b11.length == 0) { Log.w("ExifInterface", "stripByteCounts should not be null or have zero length."); return; } if (b10.length != b11.length) { Log.w("ExifInterface", "stripOffsets and stripByteCounts should have same length."); return; } long j10 = 0; for (long j11 : b11) { j10 += j11; } byte[] bArr = new byte[(int) j10]; this.f43604h = true; int i11 = 0; int i12 = 0; int i13 = 0; while (i11 < b10.length) { int i14 = (int) b10[i11]; int i15 = (int) b11[i11]; if (i11 < b10.length - i10 && i14 + i15 != b10[i11 + 1]) { this.f43604h = false; } int i16 = i14 - i12; if (i16 < 0) { Log.d("ExifInterface", "Invalid strip offset value"); return; } long j12 = i16; if (bVar.skip(j12) != j12) { Log.d("ExifInterface", "Failed to skip " + i16 + " bytes."); return; } int i17 = i12 + i16; byte[] bArr2 = new byte[i15]; if (bVar.read(bArr2) != i15) { Log.d("ExifInterface", "Failed to read " + i15 + " bytes."); return; } i12 = i17 + i15; System.arraycopy(bArr2, 0, bArr, i13, i15); i13 += i15; i11++; i10 = 1; } if (this.f43604h) { long j13 = b10[0]; return; } return; } } if (f43583m) { Log.d("ExifInterface", "Unsupported data type value"); } z10 = false; if (z10) { } } public final void x(int i10, int i11) { if (this.f43601e[i10].isEmpty() || this.f43601e[i11].isEmpty()) { if (f43583m) { Log.d("ExifInterface", "Cannot perform swap since only one image data exists"); return; } return; } c cVar = this.f43601e[i10].get("ImageLength"); c cVar2 = this.f43601e[i10].get("ImageWidth"); c cVar3 = this.f43601e[i11].get("ImageLength"); c cVar4 = this.f43601e[i11].get("ImageWidth"); if (cVar == null || cVar2 == null) { if (f43583m) { Log.d("ExifInterface", "First image does not contain valid size information"); return; } return; } if (cVar3 == null || cVar4 == null) { if (f43583m) { Log.d("ExifInterface", "Second image does not contain valid size information"); return; } return; } int f10 = cVar.f(this.f43603g); int f11 = cVar2.f(this.f43603g); int f12 = cVar3.f(this.f43603g); int f13 = cVar4.f(this.f43603g); if (f10 >= f12 || f11 >= f13) { return; } HashMap<String, ExifInterface.ExifAttribute>[] hashMapArr = this.f43601e; HashMap<String, ExifInterface.ExifAttribute> hashMap = hashMapArr[i10]; hashMapArr[i10] = hashMapArr[i11]; hashMapArr[i11] = hashMap; } public final void y(f fVar, int i10) { c d10; c d11; c cVar = this.f43601e[i10].get("DefaultCropSize"); c cVar2 = this.f43601e[i10].get("SensorTopBorder"); c cVar3 = this.f43601e[i10].get("SensorLeftBorder"); c cVar4 = this.f43601e[i10].get("SensorBottomBorder"); c cVar5 = this.f43601e[i10].get("SensorRightBorder"); if (cVar != null) { if (cVar.f43617a == 5) { e[] eVarArr = (e[]) cVar.h(this.f43603g); if (eVarArr == null || eVarArr.length != 2) { StringBuilder a10 = android.support.v4.media.b.a("Invalid crop size values. cropSize="); a10.append(Arrays.toString(eVarArr)); Log.w("ExifInterface", a10.toString()); return; } d10 = c.c(eVarArr[0], this.f43603g); d11 = c.c(eVarArr[1], this.f43603g); } else { int[] iArr = (int[]) cVar.h(this.f43603g); if (iArr == null || iArr.length != 2) { StringBuilder a11 = android.support.v4.media.b.a("Invalid crop size values. cropSize="); a11.append(Arrays.toString(iArr)); Log.w("ExifInterface", a11.toString()); return; } d10 = c.d(iArr[0], this.f43603g); d11 = c.d(iArr[1], this.f43603g); } this.f43601e[i10].put("ImageWidth", d10); this.f43601e[i10].put("ImageLength", d11); return; } if (cVar2 != null && cVar3 != null && cVar4 != null && cVar5 != null) { int f10 = cVar2.f(this.f43603g); int f11 = cVar4.f(this.f43603g); int f12 = cVar5.f(this.f43603g); int f13 = cVar3.f(this.f43603g); if (f11 <= f10 || f12 <= f13) { return; } ExifInterface.ExifAttribute d12 = c.d(f11 - f10, this.f43603g); ExifInterface.ExifAttribute d13 = c.d(f12 - f13, this.f43603g); this.f43601e[i10].put("ImageLength", d12); this.f43601e[i10].put("ImageWidth", d13); return; } c cVar6 = this.f43601e[i10].get("ImageLength"); c cVar7 = this.f43601e[i10].get("ImageWidth"); if (cVar6 == null || cVar7 == null) { c cVar8 = this.f43601e[i10].get("JPEGInterchangeFormat"); c cVar9 = this.f43601e[i10].get("JPEGInterchangeFormatLength"); if (cVar8 == null || cVar9 == null) { return; } int f14 = cVar8.f(this.f43603g); int f15 = cVar8.f(this.f43603g); fVar.c(f14); byte[] bArr = new byte[f15]; fVar.read(bArr); f(new b(bArr), f14, i10); } } public final void z() { x(0, 5); x(0, 4); x(5, 4); ExifInterface.ExifAttribute exifAttribute = (c) this.f43601e[1].get("PixelXDimension"); ExifInterface.ExifAttribute exifAttribute2 = (c) this.f43601e[1].get("PixelYDimension"); if (exifAttribute != null && exifAttribute2 != null) { this.f43601e[0].put("ImageWidth", exifAttribute); this.f43601e[0].put("ImageLength", exifAttribute2); } if (this.f43601e[4].isEmpty() && p(this.f43601e[5])) { HashMap<String, ExifInterface.ExifAttribute>[] hashMapArr = this.f43601e; hashMapArr[4] = hashMapArr[5]; hashMapArr[5] = new HashMap<>(); } if (!p(this.f43601e[4])) { Log.d("ExifInterface", "No image meets the size requirements of a thumbnail image."); } v(0, "ThumbnailOrientation", "Orientation"); v(0, "ThumbnailImageLength", "ImageLength"); v(0, "ThumbnailImageWidth", "ImageWidth"); v(5, "ThumbnailOrientation", "Orientation"); v(5, "ThumbnailImageLength", "ImageLength"); v(5, "ThumbnailImageWidth", "ImageWidth"); v(4, "Orientation", "ThumbnailOrientation"); v(4, "ImageLength", "ThumbnailImageLength"); v(4, "ImageWidth", "ThumbnailImageWidth"); } }