Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How should the parameters of the black and white filter be set? #25

Closed
paintingStyle opened this issue Jan 7, 2021 · 2 comments
Closed

Comments

@paintingStyle
Copy link

Thanks to the author for writing such a great library!

Drag the progress bar to make the picture whiter, I tried it, the effect is not good

  void updateFilterValue(value) async {
    if (_filterValue == value) {
      return;
    }
    _filterValue = value;

    Bitmap bitmap = await Bitmap.fromProvider(ExtendedExactAssetImageProvider('assets/images/photoShoot/ic_icon_editor_topic_example.jpg'));
    Bitmap brightBitmap = bmp.brightness(bitmap, value); // 位图亮度, 可以在-1.0和1.0之间。 0.0不执行任何操作;
    Bitmap nowThisBitmapLooksWeird = bmp.contrast(brightBitmap, 1.5); // 对比度 0~2.0的范围  default 1.0
    Bitmap finalBitmap = bmp.adjustColor(nowThisBitmapLooksWeird, saturation: 0); // 饱和度 0 1
    result = finalBitmap.buildHeaded();

    notifyListeners();
  }
@renancaraujo
Copy link
Member

Could you be mroe descriptive on what the effect is not good means?

@renancaraujo
Copy link
Member

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants