aspose file tools
The moose likes Other JSE/JEE APIs and the fly likes Java2D: byte[ ] from an Image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java2D: byte[ ] from an Image" Watch "Java2D: byte[ ] from an Image" New topic
Author

Java2D: byte[ ] from an Image

Jez Nicholson
Ranch Hand

Joined: Oct 01, 2002
Posts: 39
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

Joined: Oct 01, 2002
Posts: 39
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Java2D: byte[ ] from an Image
 
It's not a secret anymore!