Mercurial > cgi-bin > hgweb.cgi > SimpleResizer
comparison app/src/main/java/com/bartsent/simpleresizer/lib/getScaledInstance.kt @ 34:19c584b29679
Add gradle files, bump rev to bypass installer cache misfeature.
author | David Barts <n5jrn@me.com> |
---|---|
date | Thu, 11 Mar 2021 17:31:56 -0800 |
parents | 86740f593b6c |
children | 6607f675a5f7 |
comparison
equal
deleted
inserted
replaced
33:bead5d7e8c69 | 34:19c584b29679 |
---|---|
1 package com.bartsent.simpleresizer.lib | 1 package com.bartsent.simpleresizer.lib |
2 | 2 |
3 import android.graphics.Bitmap | 3 import android.graphics.Bitmap |
4 | 4 |
5 /** | 5 /** |
6 * A quality scaler, rather simpler than Image.getScaledInstance in that it has only | 6 * A quality scaler, rather simpler than Image.getScaledInstance in that it |
7 * one (slow, high-quality) option. | 7 * currently has only one (slow, high-quality) option. |
8 * @param newWidth Width of new bitmap | 8 * @param newWidth Width of new bitmap |
9 * @param newHeight Height of new bitmap | 9 * @param newHeight Height of new bitmap |
10 * @return New bitmap | 10 * @return New bitmap |
11 */ | 11 */ |
12 fun Bitmap.getScaledInstance(newWidth: Int, newHeight: Int, kernel: ScalingKernel = LanczosKernel()): Bitmap { | 12 fun Bitmap.getScaledInstance(newWidth: Int, newHeight: Int, kernel: ScalingKernel = LanczosKernel()): Bitmap { |