Blur effect improvements

- Reduce time it takes to blur image
- Fixed IndexOutOfBoundsException by reducing radius
This commit is contained in:
daniel oeh 2015-01-04 20:17:58 +01:00
parent e127fa79c7
commit b738fc268e
2 changed files with 3 additions and 1 deletions

View File

@ -377,6 +377,7 @@ public class ItemlistFragment extends ListFragment {
.placeholder(R.color.image_readability_tint)
.error(R.color.image_readability_tint)
.transform(PicassoProvider.blurTransformation)
.resize(PicassoProvider.BLUR_IMAGE_SIZE, PicassoProvider.BLUR_IMAGE_SIZE)
.into(imgvBackground);
Picasso.with(getActivity())

View File

@ -211,7 +211,8 @@ public class PicassoProvider {
}
}
public static final int BLUR_RADIUS = 10;
public static final int BLUR_RADIUS = 1;
public static final int BLUR_IMAGE_SIZE = 100;
public static final String BLUR_KEY = "blur";
public static final Transformation blurTransformation = new Transformation() {