Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Ayush-5k
Copy link

@Ayush-5k Ayush-5k commented Apr 16, 2025

Problem:
The get_color() function in the Blur_Layer was not correctly implemented (fix #3389), leading to unexpected behavior when using the Eyedropper tool on blurred areas. Specifically, the color picked by the Eyedropper would not accurately reflect the blurred area, resulting in inconsistencies in the preview.

Solution:
This update improves the get_color() function by introducing an averaging technique. Instead of sampling a single point, the function now samples multiple points around the target position, based on the blur size. This ensures that the color returned is a more accurate representation of the blurred area.

The following changes were made:

  • The color is now averaged over a small sample grid (steps = 3), with each point within the grid contributing to the final color.
  • This approach simulates a more accurate blurred color, reflecting the visual appearance of the blur effect.

BEFORE:
Screenshot 2025-04-17 025956

AFTER:
Screenshot 2025-04-17 025933

@github-actions
Copy link

Thank you for contributing!
Below is how your contribution will appear in Synfig's release notes. Review it and improve your pull request's title and description so that your contribution is clear. You can add images, videos, and anything else you want. Have fun!

🐞 Bug Fixes

  • Implemented get_color() correctly in Blur layer

    Problem:
    The get_color() function in the Blur_Layer was not correctly implemented (as mentioned in issue #3389), leading to unexpected behavior when using the Eyedropper tool on blurred areas. Specifically, the color picked by the Eyedropper would not accurately reflect the blurred area, resulting in inconsistencies in the preview.

    Solution:
    This update improves the get_color() function by introducing an averaging technique. Instead of sampling a single point, the function now samples multiple points around the target position, based on the blur size. This ensures that the color returned is a more accurate representation of the blurred area.

    The following changes were made:

    • The color is now averaged over a small sample grid (steps = 3), with each point within the grid contributing to the final color.
    • This approach simulates a more accurate blurred color, reflecting the visual appearance of the blur effect.

    BEFORE:
    Screenshot 2025-04-17 025956

    AFTER:
    Screenshot 2025-04-17 025933

@github-actions
Copy link

Thank you for attempting to improve your contribution description!
Below is how your updated contribution will appear in Synfig's release notes. Review it and make further improvements until you're satisfied!

🐞 Bug Fixes

  • Implemented get_color() correctly in Blur layer

    Problem:
    The get_color() function in the Blur_Layer was not correctly implemented (fix #3389), leading to unexpected behavior when using the Eyedropper tool on blurred areas. Specifically, the color picked by the Eyedropper would not accurately reflect the blurred area, resulting in inconsistencies in the preview.

    Solution:
    This update improves the get_color() function by introducing an averaging technique. Instead of sampling a single point, the function now samples multiple points around the target position, based on the blur size. This ensures that the color returned is a more accurate representation of the blurred area.

    The following changes were made:

    • The color is now averaged over a small sample grid (steps = 3), with each point within the grid contributing to the final color.
    • This approach simulates a more accurate blurred color, reflecting the visual appearance of the blur effect.

    BEFORE:
    Screenshot 2025-04-17 025956

    AFTER:
    Screenshot 2025-04-17 025933

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.

get_color() not implemented correctly in Blur Layer

1 participant