开发者

how can resize the original image in android

开发者 https://www.devze.com 2023-02-03 07:53 出处:网络
i am working on image ,upload original image in this original image resize the small image this image saved in to database

i am working on image ,upload original image in this original image resize the small image this image saved in to database

original image --> resize it (small image )--> small image saved in to database

please forward solu开发者_JAVA技巧tion

thanks


To do this you'll want to play around with the Bitmap class.

It has several functions to create new bitmaps form previous ones

Bitmap bmp2 = Bitmap.createScaledBitmap(bmp, width, height, true);

a full list can be found in the documentation :

http://developer.android.com/reference/android/graphics/Bitmap.html

Regarding the save to a database I've never done but it would depend on your server.

0

精彩评论

暂无评论...
验证码 换一张
取 消