1. Problem description
A new bug was raised in the test today. The reason is that the test uploaded one Image in webp format
When running the code to javax.imageio.ImageIO.read(inputStream) . Null is returned.
2. Solutions
You only need to add the following dependencies without moving the code
<dependency>
<groupId>org.sejda.imageio</groupId>
<artifactId>webp-imageio</artifactId>
<version>0.1.6</version>
</dependency>
Run again, solve the problem.
Read More:
- [Solved] POI Read excel Error: Your InputStream was neither an OLE2 stream, nor an OOXML stream
- JAVA: How to Read JSON Format Data (Web Game Development)
- [Solved] itextpdf Read PDF File Error: Rebuild failed: trailer not found.
- [Solved] Read the resources resource and convert it to file error: java.io.filenotfoundexception
- Uncaught TypeError: Cannot read property ‘toFixed‘ of null
- Java.sql.sqlexception: unable to read more data from socket
- (error) READONLY You can‘t write against a read only replica.
- Microservice call exceptions: error feign.RetryableException: Read timed out executing POST http://xxx…….
- [Solved] maven Error: Failed to read artifact descriptor for org.
- BeanDefinitionStoreException: Failed to read candidate component class probably due to a new Java
- [Solved] Seata Error: endpoint format should like ip:port
- The problem of date format conversion between springboot and front end
- How to compare the time in two TimeStamp format?
- How to Solve Image Upload Error: Uncaught (in promise) DOMException: Failed to execute ‘put‘ on ‘IDBObjectStore‘
- How to Upload Docker Image to docker hub
- Problems and causes of Java’s main function format (public static void main (string args()))
- [Solved] Tesseract ocr error: JFIF APP0 must be first marker after SOI
- How to Solve The classpathresource reads the resource file Error
- Spring project import @Resource Annotation Error [How to Solve]
- [Solved] nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter