File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Convert and display image from byte array

 
Red Ajnupez
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a method from a webservice that returns a bytearray that is an image and i want to display this as a response.

I tried create a jpg file and then display it but this doesn't work. The file is created but i cant displayed it.

.

Does anyone know how to do this?


Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to return the image as the response, why are you writing HTML?

Do you want to return the image as the response? Or return an HTML page that contains the image?

I assume the former, but your code is trying to do the latter.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic