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 )
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
Post a Comment