diff --git a/app/src/main/java/code/name/monkey/retromusic/util/AutoGeneratedPlaylistBitmap.java b/app/src/main/java/code/name/monkey/retromusic/util/AutoGeneratedPlaylistBitmap.java index aea4fa1d..9df37933 100644 --- a/app/src/main/java/code/name/monkey/retromusic/util/AutoGeneratedPlaylistBitmap.java +++ b/app/src/main/java/code/name/monkey/retromusic/util/AutoGeneratedPlaylistBitmap.java @@ -40,7 +40,7 @@ public class AutoGeneratedPlaylistBitmap { List art = new ArrayList<>(); for (Long id : albumID) { Bitmap bitmap = getBitmapWithAlbumId(context, id); - if (bitmap != null) art.add(bitmap); + if (bitmap != null) art.add(BitmapEditor.getRoundedCornerBitmap(bitmap, 10)); if (art.size() == 9) break; } return MergedImageUtils.INSTANCE.joinImages(art); diff --git a/app/src/main/java/code/name/monkey/retromusic/util/MergedImageUtils.kt b/app/src/main/java/code/name/monkey/retromusic/util/MergedImageUtils.kt index e4864bc7..59095d9a 100644 --- a/app/src/main/java/code/name/monkey/retromusic/util/MergedImageUtils.kt +++ b/app/src/main/java/code/name/monkey/retromusic/util/MergedImageUtils.kt @@ -1,6 +1,9 @@ package code.name.monkey.retromusic.util -import android.graphics.* +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.Matrix +import android.graphics.Paint import com.bumptech.glide.util.Util.assertBackgroundThread @@ -75,25 +78,12 @@ internal object MergedImageUtils { val bit = Bitmap.createScaledBitmap(bitmap, onePartSize, onePartSize, true) canvas.drawBitmap( bit, - (onePartSize * (i % parts)).toFloat(), - (onePartSize * (i / parts)).toFloat(), + (onePartSize * (i % parts)).toFloat() + (i % 3) * 50, + (onePartSize * (i / parts)).toFloat() + (i / 3) * 50, paint ) bit.recycle() } - - paint.color = Color.WHITE - paint.strokeWidth = 10f - - val oneThirdSize = (IMAGE_SIZE / 3).toFloat() - val twoThirdSize = (IMAGE_SIZE / 3 * 2).toFloat() - // vertical lines - canvas.drawLine(oneThirdSize, 0f, oneThirdSize, imageSize.toFloat(), paint) - canvas.drawLine(twoThirdSize, 0f, twoThirdSize, imageSize.toFloat(), paint) - // horizontal lines - canvas.drawLine(0f, oneThirdSize, imageSize.toFloat(), oneThirdSize, paint) - canvas.drawLine(0f, twoThirdSize, imageSize.toFloat(), twoThirdSize, paint) - return result }