android - Get a thumbnail from a Bitmap located at a web address -
android - Get a thumbnail from a Bitmap located at a web address -
in xamarin, possible thumbnail of bitmap
hosted @ web address?
i have code:
public static int calculateinsamplesize(bitmapfactory.options options, int reqwidth, int reqheight) { // raw height , width of image var height = (float)options.outheight; var width = (float)options.outwidth; var insamplesize = 1d; if (height > reqheight || width > reqwidth) { insamplesize = width > height ? height/reqheight : width/reqwidth; } homecoming (int) insamplesize; } public static bitmap decodesampledbitmapfromresource(resources res, int resid, int reqwidth, int reqheight) { // first decode injustdecodebounds=true check dimensions var options = new bitmapfactory.options { injustdecodebounds = true, }; using (var dispose = bitmapfactory.decoderesource(res, resid, options)) { } // calculate insamplesize options.insamplesize = calculateinsamplesize(options, reqwidth, reqheight); // decode bitmap insamplesize set options.injustdecodebounds = false; homecoming bitmapfactory.decoderesource(res, resid, options); }
can code modified thumbnail of bitmap
stored @ web address?
thanks in advance
android xamarin thumbnails android-bitmap webaddress
Comments
Post a Comment