Created
May 9, 2016 09:40
-
-
Save rndstr/e6768fa7a6da5eec9b1af07e63418b82 to your computer and use it in GitHub Desktop.
PreventIpViolationProcessor for UniversalImageLoader (Android)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.schilter.faactors.service; | |
import android.graphics.Bitmap; | |
import com.nostra13.universalimageloader.core.process.BitmapProcessor; | |
/** | |
* Replaces an image with a single color version. To create screnshots | |
* for the Google Play Store listing with images you don't own the IP for. | |
* | |
* <code> | |
* DisplayImageOptions options = new DisplayImageOptions.Builder() | |
* … | |
* .postProcessor(new PreventIpViolationProcessor()) | |
* … | |
* </code> | |
*/ | |
public class PreventIpViolationProcessor implements BitmapProcessor { | |
@Override | |
public Bitmap process(Bitmap bitmap) { | |
return Bitmap.createScaledBitmap(bitmap, 1, 1, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment