title: From JPEG data to a complete JPEG file
body: <p>I am currently parsing a PDF file using iText, and I encountered an image format which is not supported: </p>
  
  <pre><code>com.itextpdf.text.exceptions.UnsupportedPdfException: The filter /JPXDecode is not supported.
  </code></pre>
  
  <p>It seems that the information in the raw byte array is JPEG data, without the header information, as the <code>file</code> command line utility indicates:</p>
  
  <pre><code>83.jpg: JPEG 2000 image data
  </code></pre>
  
  <p>My first idea would be to simple add the header metadata to these files, but I simply don't know how.</p>
  
  <p>How can I add the header metadata to a raw piece of JPEG 2000 data ? A solution using iText would work as well.</p>