java - How to crate BufferedImage from bitmap data -


after going through many similar looking questions had no way put own question here.

i need display image on swing application. source of image bitmap data retrieved ms sql server. have tried following ways

try 1 - have tried creating imageicon bytes retrieved. no results.

try 2 - saved bytes in .png file , tried loading using imageio. works fine on local machine fails on test server. both windows machines.

try3 - on step 2 tried saving in different formats .png. not work @ all.

please let me know missing?

note : have tried including jai jars referenced libraries also.

you should have stored hint format data has in database. if not, can hope imageio can handle it.

there no need write data files (which pitfall in itself, where write them? think of restricted process privileges , disk quotas). create inputstream accesses data directly (e.g. java.io.bytearrayinputstream), way can have imageio load directly using stream based methods.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -