Skip to content

Commit

Permalink
Performance improvement on pre-processing
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas authored and nicolas committed Jun 21, 2013
1 parent b7013c3 commit 951e670
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 204 deletions.
201 changes: 0 additions & 201 deletions BlurEffect/LICENCE.TXT

This file was deleted.

1 change: 0 additions & 1 deletion BlurEffect/src/com/npi/blureffect/Blur.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ public static Bitmap fastblur(Bitmap sentBitmap, int radius) {

Log.e("pix", w + " " + h + " " + pix.length);
bitmap.setPixels(pix, 0, w, 0, 0, w, h);

return (bitmap);
}

Expand Down
6 changes: 4 additions & 2 deletions BlurEffect/src/com/npi/blureffect/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
public void run() {

// No image found => let's generate it!
Bitmap image = BitmapFactory.decodeResource(getResources(), R.drawable.image);
Bitmap newImg = Blur.fastblur(image, 50);
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 4;
Bitmap image = BitmapFactory.decodeResource(getResources(), R.drawable.image, options);
Bitmap newImg = Blur.fastblur(image, 12);
ImageUtils.storeImage(newImg, blurredImage);
runOnUiThread(new Runnable() {

Expand Down

0 comments on commit 951e670

Please sign in to comment.