How to decode bitmap with sample size not equals power of 2?
<p>Simple example:</p>

<pre><code>BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inSampleSize = scale;
Bitmap bmp = BitmapFactory.decodeStream(is, null, opts);
</code></pre>

<p>When I'm passing <code>scale</code> value not equal to power of two, bitmap is still scaled by closest power of 2 value. For example, if <code>scale = 3</code> then actual scale become <code>2</code> for some reason. Maybe it's because I'm using hardware acceleration?</p>

<p>Anyway, how can I scale bitmap by non power-of-2 value without allocation memory for full bitmap?</p>

<p>P.S. I know, that using power of two is much faster, but in my case time isn't such critical and I need image scaled <strong>exactly</strong> by provided scale (otherway it's become too big or too small) - I'm woking with image processing, so big image itself not such a problem (<code>ImageView</code> scales it to required size), but it takes extra time to apply some filter for example.</p>
