Code example for Bitmap

Methods: getHeightgetWidthsetPixels

0
    private void filter() { 
        final float[] m = satMatrix.getArray();
	jniFilter(mInPixels, mOutPixels, m, mGamma, mInBlack, mOverInWMinInB, mOutWMinOutB,
		mOutBlack);
 
        mBitmapOut.setPixels(mOutPixels, 0, mBitmapOut.getWidth(), 0, 0,
                             mBitmapOut.getWidth(), mBitmapOut.getHeight());
    } 
 
    public void benchmark(View v) {
        filter(); 
        long t = java.lang.System.currentTimeMillis();
        filter(); 
        t = java.lang.System.currentTimeMillis() - t;
        mDisplayView.invalidate();
        mBenchmarkResult.setText("Result: " + t + " ms");
    } 
 
    public native void jniFilter(int[] InPixels, int[] OutPixels, float[] mm, float gamma, float InBlack, float OverInWMinInB, float OutWMinOutB, float OutBlack);