JAVA - store an image blob with a fixed size -


i'm trying save entity (hibernate) contains blob field.

this blob may vary in size..

my goal persist fixed size (10 kb).

format of images jpeg, , keep original width \ height rather reducing them (compress not re-size)

losing original image quality not issue.

(on side note - blob being created form byte array, maybe process of size reduction supposed executed on byte array instead of blob? either way help..)

thanks!

this has nothing hibernate , persistence. image should reduced before, in business logic layer. resulting byte array should stored in persistent entity. find image manipulation library can compress jpegs. – jb nizet


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -