1

inSampleSize is not working

view story
linux-howto

http://stackoverflow.com – In short, I can't resize my image file (475px in height) using inSampleSize. Code as below. Image should be reduced to 237.5 px, after the code, isn't it? But it remains unchanged, exactly same as original dimension. Anybody can help please. File f = new File(context.getCacheDir(), "1223fdf"); URL imageUrl = new URL("http://example.com/file.jpg"); HttpURLConnection conn = (HttpURLConnection)imageUrl.openConnection(); conn.setConnectTimeout(30000); conn.setReadTimeout(30000); conn.setInstanceFollowRedirects(false); String url = conn.getHeaderField("Location"); URL redirectURL = new URL(url); (HowTos)