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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -