Fixed a palette deprecation.
This commit is contained in:
parent
db868f8a75
commit
1179aca8ed
1 changed files with 1 additions and 4 deletions
|
|
@ -14,14 +14,11 @@ import java.util.Comparator;
|
||||||
* @author Karim Abou Zeid (kabouzeid)
|
* @author Karim Abou Zeid (kabouzeid)
|
||||||
*/
|
*/
|
||||||
public class PhonographColorUtil {
|
public class PhonographColorUtil {
|
||||||
public static final int PALETTE_BITMAP_AREA = 50 * 50;
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static Palette generatePalette(Bitmap bitmap) {
|
public static Palette generatePalette(Bitmap bitmap) {
|
||||||
if (bitmap == null) return null;
|
if (bitmap == null) return null;
|
||||||
return Palette.from(bitmap)
|
return Palette.from(bitmap).generate();
|
||||||
.resizeBitmapArea(PALETTE_BITMAP_AREA)
|
|
||||||
.generate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ColorInt
|
@ColorInt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue