aspose file tools
The moose likes Java in General and the fly likes Blob to image and then scale it. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Blob to image and then scale it." Watch "Blob to image and then scale it." New topic
Author

Blob to image and then scale it.

Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Dear Friends,

I have a Bolb object of an image stored in database. I am using servlet. Now what i want to do is that. i need to send the image constructed from blob in scaled version to web browser. How to achieve this. Please help me out.

Cheers
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19232

For turning the BLOB into an image you should check out class ImageIO. For scaling just search around. I've posted a little piece of code just this weekend in the Swing / AWT forum in this thread.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Thanks rob,

Can you please upload whole code. I will be thankful to you. I just want specific code to do that.

Thanks in advance.

Cheers
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32833
    
    4
And welcome to the Ranch
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19232

Jagdeep Sharma wrote:Can you please upload whole code. I will be thankful to you. I just want specific code to do that.

No, we are NotACodeMill. You can't tell me that using one single method from ImageIO and the snippet from that other thread can't help you out solve the issue yourself.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Blob to image and then scale it.
 
Similar Threads
Retrieve picture (blob) with ireport
want to insert photo(jpeg) in mssql image datatype
Display pictures in an applet
Display image in JSP
Retrieving blob object