This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

images and byte arrays

 
Tracey Currier
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tracey Currier
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic