File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes images and byte arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "images and byte arrays" Watch "images and byte arrays" New topic
Author

images and byte arrays

Tracey Currier
Ranch Hand

Joined: Feb 06, 2001
Posts: 50
I'm sending an image via a JPEGEncoder to a ByteArrayOutputStream
from my servlet to an applet. I have tried to
recreate the image with a decoder(says it is not
a jpeg file) and from a byte array <Toolkit.getDefaultToolkit().createImage(byte[])>
I have the size of the array, why is it not
drawing?
Thanks


MS,MS,SCJP,SCBCD Seize the day!
Tracey Currier
Ranch Hand

Joined: Feb 06, 2001
Posts: 50
I have found out that my image (a buffered image)
when created set the field to TYPE_BYTE_INDEX so
I reset it to TYPE_INT_RGB but still no go. Does anybody know if it is necessary to convert bytes to pixels when recreating the image in the applet?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: images and byte arrays
 
Similar Threads
how to remove unwanted pixels from image
Commons codec Base64 problem
Combining Binary and Character data
how to create an image through bufferedimage,image and other helper class using byte array
create ImageIcon from bytes[], not from file