android - What are the dangers of setting outWidth and outHeight instead of inSampleSize for decoding bitmap -


to resize bitmap in android, thinking of doing

bitmapfactory.options options = new bitmapfactory.options(); options.insamplesize = 1; options.injustdecodebounds = true; bitmapfactory.decodefile(filepath, options); // options.insamplesize = imageresizer.calculateinsamplesize(options, x, y); options.outwidth = x; options.outheight = y; options.injustdecodebounds = false; bitmap bmp = bitmapfactory.decodefile(filepath, options); 

please, notice line commented out. how approach differ (compare , contrast) more usual

bitmapfactory.options options = new bitmapfactory.options(); options.insamplesize = 1; options.injustdecodebounds = true; bitmapfactory.decodefile(filepath, options); options.insamplesize = imageresizer.calculateinsamplesize(options, x, y); // options.outwidth = x; // options.outheight = y; options.injustdecodebounds = false; bitmap bmp = bitmapfactory.decodefile(filepath, options); 

how if keep of them? in

bitmapfactory.options options = new bitmapfactory.options(); options.insamplesize = 1; options.injustdecodebounds = true; bitmapfactory.decodefile(filepath, options); options.insamplesize = imageresizer.calculateinsamplesize(options, x, y); options.outwidth = x; options.outheight = y; options.injustdecodebounds = false; bitmap bmp = bitmapfactory.decodefile(filepath, options); 

what dangers of setting outwidth , outheight instead of insamplesize decoding bitmap

outwidth , outheight output values. not input values. setting them nothing useful.


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -