title: UnsupportedFormatException: No suitable ImageReader found for source data
body: <p>I'm using java code to create a <code>thumbnail</code> image for all types of uploading images with a fixed size 250x250. And it is working for all the types of images except <code>"jpeg"</code> images. On trying with jpeg images, the code returns an error like<code>"net.coobird.thumbnailator.tasks.UnsupportedFormatException: No suitable ImageReader found for source data."</code>
  Here is the sample code which I'm trying</p>
  
  <pre><code>            String tempDir = System.getProperty("java.io.tmpdir");
              String fileName = file.getOriginalFilename();
              String fileNameWithoutExt = fileName.substring(0, fileName.lastIndexOf("."));
              fileName = fileName.replace(fileNameWithoutExt, fileNameWithoutExt + "-thumbnail");
              Builder builder = Thumbnails.of(new ByteArrayInputStream(fileData)).size(250, 250);
              File thumbnail = new File(tempDir + "\\" + fileName);
              builder.toFile(thumbnail);
  </code></pre>
  
  <p>And the dependency i'm using is </p>
  
  <pre><code>        &lt;dependency&gt;
               &lt;groupId&gt;net.coobird&lt;/groupId&gt;
               &lt;artifactId&gt;thumbnailator&lt;/artifactId&gt;
               &lt;version&gt;[0.4, 0.5)&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>I also tried the latest maven dependency for thumbnailator</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;net.coobird&lt;/groupId&gt;
          &lt;artifactId&gt;thumbnailator&lt;/artifactId&gt;
          &lt;version&gt;0.4.8&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>But this one also returns the same error, Is there any other way to do the same?</p>