cats-oss/android-gpuimage

when set scaletype to CENTER_INSIDE,how to save filtered image with no black border?

whoami-I opened this issue · 2 comments

Future Task

What is the motivation?

What kind of solution can be considered?

What do you want to discuss?

Please add relevant labels


Bug Reporting

Steps to Reproduce

Actual Results (include screenshots)

Expected Results (include screenshots)

URL

OS details

  • Device:
  • OS:

Please add relevant labels

for example ,this is original image
c604f64e5ad5e060a5646ea97268e7b2
but the saved image is this one:
1615454953420

In My case, I use ImageView in the layout file on the filter apply so to capture a Bitmap set bitmap into Image View.

When changing Image Change Gpuimage & ImageView at the same time

GPUImage filterLoader;
ImageView view_filter;

// Inslize the View
view_filter = findViewById(R.id.view_filter); // Form your layout file
filterLoader = new GPUImage(this); // Just only in java code Not a child for any layout or View

//When filter apply change the Image
filterLoader.setFilter(new GPUImageGlassSphereFilter()); // Set Filter

setImage(filterLoader.getBitmapWithFilterApplied()); // Capture bitmap

// Fill the Bitmap
private void setImage(Bitmap fill) {
view_filter.setImageBitmap(fill);
filterLoader.setImage(fill);
}