This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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
 
GeeCON Prague 2014
 
subject: Java2D: byte[ ] from an Image