android-crop icon indicating copy to clipboard operation
android-crop copied to clipboard

Using createScaledBitmap, using a scaled matrix and calling createBit…

Open blinkmacalahan opened this issue 8 years ago • 3 comments

…map, and other methods involving scale always caused bad looking images. Using inSampleSize while decoding resulted in much better looking images. The only downside to using it is that you cannot get an exact dimension. This is because isSampleSize must be a power of 2. So if you aren't picky about the exact dimension of your final scaled image and want better quality, you can use withScaleMethod and specify BETTER_QUALITY_BEST_FIT. The default uses the traditional method.

I've attached two files. The file called matrixScaled.jpg is done with what the library originally does and sampleSizeDecoding.jpg in an image using my proposed code. matrixscale samplesizedecoding

blinkmacalahan avatar Apr 28 '16 19:04 blinkmacalahan

How did you get around travis? i keep getting lint errors

Lawgrin avatar Apr 28 '16 19:04 Lawgrin

@Lawgrin, um I don't know. I made a fork a few hours ago and made my code changes, committed, and then creating a pull request. Nothing special.

blinkmacalahan avatar Apr 28 '16 20:04 blinkmacalahan

@blinkmacalahan OK i obviously made to many changes on mine for it to just take it. Thnx

Lawgrin avatar Apr 28 '16 20:04 Lawgrin