0

假设我捕获了一张名为_originalBitmap

  1. 然后我修改将某种类型的Brightness Increase过滤器应用于_originalBitmapby

    filteredBitmap = _BrightnessIncrease.filterImage(_originalBitmap);

  2. 然后我单击Apply按钮将 保存filteredBitmap到内存位置。

  3. 我想Brightness Increase 再次申请,但在filteredBitmap. 有谁知道我该怎么做??????

到目前为止的代码 - BrightnessIncrease Button:

Button filter6Button = (Button) findViewById(R.id.filter6_button);
    filter6Button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {


            for (int i = MainActivity.LEFT_IMAGE; i <= MainActivity.RIGHT_IMAGE; i++) {

                _filteredBitmaps[i] = _BrightnessIncrease
                        .filterImage(_originalBitmaps[i]);
                // */
            }
            _filterImageView
                    .setImageBitmap(_filteredBitmaps[MainActivity.LEFT_IMAGE]);
        }
    });
4

1 回答 1

1

为什么不将过滤后的位图保存在另一个列表中?

for (int i = MainActivity.LEFT_IMAGE; i <= MainActivity.RIGHT_IMAGE; i++) {
    _filterImageView[i] = _originalBitmaps[i].copy(_originalBitmaps[i].getConfig(), true);
} 
    Button filter6Button = (Button) findViewById(R.id.filter6_button);
    filter6Button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {


            for (int i = MainActivity.LEFT_IMAGE; i <= MainActivity.RIGHT_IMAGE; i++) {

                _filterImageView[i] = _BrightnessIncrease
                        .filterImage(_filterImageView[i]);
                // */
            }
            _filterImageView
                    .setImageBitmap(_filterImageView[MainActivity.LEFT_IMAGE]);
        }
    });
于 2013-08-09T09:45:35.887 回答