This repository was archived by the owner on May 11, 2026. It is now read-only.
Tags: petabyt/fudge-legacy-android
Tags
Different image scaling strategy I was getting OOM with decodeByteArray on large images, so I'm now giving it options to scale the output bitmap. ``` options.inSampleSize = 2; options.inDensity = 2; options.inTargetDensity = 2; options.inScaled = true; ``` Android is doing some math between inDensity and inTargetDensity. I don't know exactly what it's doing, but 2 / 2 looks like it consistently scales the image in half. I've left in my code to to a second scaling pass of the bitmap in case this doesn't work.
PreviousNext