Skip to content

Commit

Permalink
fix: gif cause jvm crash
Browse files Browse the repository at this point in the history
  • Loading branch information
guimc233 committed Aug 1, 2024
1 parent 17a37c7 commit b8d8ab6
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ object ImageOCRFilter {
// 如果哈希不存在,进行OCR处理并存储
val imageData = ByteArrayInputStream(imageRaw.clone())
val imageType = ImageUtils.imgType(imageData)
if (imageType.equals("gif") || imageType.equals("webp") || imageType.equals("tif")) return ""
val tempFile = File.createTempFile("temp", ".$imageType")
tempFile.writeBytes(imageRaw)

Expand Down

0 comments on commit b8d8ab6

Please sign in to comment.