aspose file tools
The moose likes Servlets and the fly likes image in binary Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "image in binary" Watch "image in binary" New topic
Author

image in binary

Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
can anyone tell me what should i do to get the image in binary format
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
From where do you want to read the image? From File or From Database?
Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
I want to pass a binary form of image from servlet to user Image is already stored on server
Originally posted by Ali Gohar:
From where do you want to read the image? From File or From Database?
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
Still not understood
do you want to read the image file in form of byte[]?
Dhanashree Mankar
Ranch Hand

Joined: Aug 25, 2003
Posts: 123
Originally posted by Ali Gohar:
Still not understood
do you want to read the image file in form of byte[]?

I want to convert the image in binary form i.e 10101 And need to send it in file
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

But 'binary format' usually implies it already encoded as an image, which can be stored as file. You need to specify what the source of this 'binary data' is, and what the destination format is.
For example, if the image is stored on the harddrive of the server and you want to send it to the client, get a binary OutputStream from the request, set the mimeType to "image/imagetype" (eg image/jpeg), and pipe one to the other.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: image in binary
 
Similar Threads
Urgent-servlet response
Image Processing
How to store and retrieve images to MS access and MYsql database
Binary Data using AJAX
How to insert images in Oracle