File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
imagepipeline-base/src/main/java/com/facebook/imageformat Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -271,8 +271,13 @@ class DefaultImageFormatChecker : FormatChecker {
271
271
(ImageFormatCheckerUtils .startsWithPattern(imageHeaderBytes, DNG_HEADER_II ) ||
272
272
ImageFormatCheckerUtils .startsWithPattern(imageHeaderBytes, DNG_HEADER_MM ))
273
273
274
+ /* *
275
+ * Checks if [imageHeaderBytes] contains 'avif'.
276
+ *
277
+ * This check may not be sufficient, though it works for most AVIF images.
278
+ * Details on AVIF can be found [here](https://aomediacodec.github.io/av1-avif/).
279
+ * */
274
280
private fun isAvifHeader (imageHeaderBytes : ByteArray ): Boolean {
275
- // This check may not enough
276
281
return imageHeaderBytes
277
282
.toString(Charset .forName(" UTF-8" ))
278
283
.contains(" avif" )
You can’t perform that action at this time.
0 commit comments