Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java2D: byte[ ] from an Image

 
Jez Nicholson
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing stuff with images where I read them in from a file as byte[] and store it in the database.

I want to create a icon for it and store it as a byte[] as well...



How can I get a byte[] from iconPicture?
 
Jez Nicholson
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
erm, solved my own problem after finding this nice Thumbnail class http://www.geocities.com/marcoschmidt.geo/java-save-jpeg-thumbnail.html

using a JpegEncoder and a ByteArrayOutputStream
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic