CF,

This probably isn't the best list to be asking these types of questions, but seeing as you wrote such a long mail, i figured a pointer is at least warranted ;)

I don't think you can resize an image directly from a ByteArray, but someone here will probably prove me wrong. We need similar functionality in one of our apps, but we also store the resized preview back to the DB for later use. We can also pass the width/height in the form, but we make sure it fits a max size rect.

1. Write the image to a File from the ByteArrayOutputStream.
2. Use Java Advanced Imaging to resize it.
3. Use another ByteArrayOutputStream to return it to the browser, setting content type etc, just as you did from the BLOB.

Theres more about this in the mailing list archives, and sample code on the Sun JAI site.

Regards,
James.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to