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

Adding filter functionality like brightness, saturation, inversion, grayscale #1034

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

oschildt
Copy link

Summary

New feature:
I have added the functionality for applying some additional effects to the image beneath rotation, flipping, resizing and cropping. That are:

  • brightness
  • saturation
  • inversion
  • grayscale

Bug fix
EVENT_ZOOM should be fired after the canvas is re-rendered, otherwise the canvas data is not actual by reacting on the event.

Demo: http://www.php-smart-factory.org/cropper/

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • Edge
  • IE

…of the canvas is desynchronized, because scale factor is not considered in the initCanvas method.
@oschildt
Copy link
Author

The method initCanvas considers the rotation but not scaling. I fixed it.

…of the canvas is desynchronized, because scale factor is not considered in the initCanvas method.
@fengyuanchen
Copy link
Owner

For filter, you can reference this example: Use Cropper with CamanJS.

@Kishlay-notabot
Copy link

This is a good quality PR! I love the simplicity

@l7777777b
Copy link

l7777777b commented Mar 18, 2024

@fengyuanchen @oschildt hello, is this compatible with v2? Or is there any way to implement this feature into v2?

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

Successfully merging this pull request may close these issues.

None yet

4 participants