Skip to content

Commit

Permalink
Update paint flags and remove anti alias.
Browse files Browse the repository at this point in the history
Fixes #366.
  • Loading branch information
sjudd committed Mar 25, 2015
1 parent e7e7620 commit e9cfd2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ private Bitmap downsampleWithSize(MarkEnforcingInputStream is, RecyclableBuffere
Bitmap.Config config = getConfig(is, decodeFormat);
options.inSampleSize = sampleSize;
options.inPreferredConfig = config;
if (options.inPreferredConfig != Bitmap.Config.ARGB_8888) {
options.inDither = true;
}
if ((options.inSampleSize == 1 || Build.VERSION_CODES.KITKAT <= Build.VERSION.SDK_INT) && shouldUsePool(is)) {
int targetWidth = (int) Math.ceil(inWidth / (double) sampleSize);
int targetHeight = (int) Math.ceil(inHeight / (double) sampleSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
public final class TransformationUtils {
private static final String TAG = "TransformationUtils";
public static final int PAINT_FLAGS = Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG | Paint.FILTER_BITMAP_FLAG;
public static final int PAINT_FLAGS = Paint.DITHER_FLAG | Paint.FILTER_BITMAP_FLAG;

private TransformationUtils() {
// Utility class.
Expand Down

0 comments on commit e9cfd2d

Please sign in to comment.