Image conversion and view in Chrome browser
<p>I have a bytearray of a tiff image. When I convert into the same format, image opens. But when I convert it into jpg, it doesn't (in Chrome, but works in IE).
PS: I want to directly convert the bytearray to show image dynamically as per my requirement.</p>

<pre><code>ByteArrayOutputStream bOutStream = new ByteArrayOutputStream(); 
bOutStream = &lt; ... Tiff image Stream Received from my API Call... &gt; 
byte[] chqImage = bOutStream.toByteArray(); 
response.setContentType("image/jpeg"); 
BufferedOutputStream output = null; 
output = new BufferedOutputStream(response.getOutputStream()); 
output.write( bOutStream.toByteArray()); 
output.flush();
</code></pre>