java - How to upgrade the quality of a Blob image after SQLite -


the encode source have put these blobs (images) in database is

bitmap image15 = bitmapfactory.decoderesource(getresources(),r.drawable.wolverineklein);  // convert bitmap byte bytearrayoutputstream stream = new bytearrayoutputstream(); image15.compress(bitmap.compressformat.png, 100, stream); byte imageinbyte1[] = stream.tobytearray(); 

and code image sqlite database

databasehandler db = new databasehandler(camera.this); list<database> contacts = db.getallcontacts(); (database contact : contacts) { bitmapfactory.options bmpfactoryoptions = new bitmapfactory.options(); bmpfactoryoptions.inpreferredconfig = bitmap.config.argb_8888; //bmpfactoryoptions.inscaled = false; // decodes blob bitmap byte[] blob = contact.getmp();  bytearrayinputstream inputstream = new bytearrayinputstream(blob); bitmap bitmap = bitmapfactory.decodestream(inputstream); bitmap scalen = bitmap.createscaledbitmap(bitmap, 320, 240, false); 

the code works fine, output of images of lower quality (the difference isn't big, use feature matching impact results. right output image more blurry ) enter image description hereenter image description here

as can see, right image output , more bit-like (check out upper chest area , compare left input image) original + size bigger. there possibility make quality better have right now?


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -