Skip to content

Conversation

@untainsYD
Copy link
Contributor

Implements bitmap-based image filtering for Java2d backend using BufferedImage and ConvolveOp.

Adds support for:

  • Gaussian blur with configurable standard deviation.
  • Box blur with radius parameter.
  • Edge detection using convolution kernels.
  • Sharpen filter with adjustable intensity.
  • Emboss effect.
  • Drop shadow simple version.
  • Custom convolution matrix operations.

TODO dropShadow

Java2d drop shadow is complex and requires multiple In this PR is a simplified implementation - full implementation would need:

  1. Extract alpha channel as shadow.
  2. Apply blur to shadow.
  3. Offset shadow.
  4. Colorize shadow.
  5. Composite original over shadow.

For now, we'll implement a basic version

- Image format (needs TYPE_INT_ARGB).
- Kernel dimensions (odd sizes work best).
- Edge handling (EDGE_NO_OP is safest).
- The destination image must be created separately.
@untainsYD
Copy link
Contributor Author

untainsYD commented Aug 31, 2025

@noelwelsh i have some issues with rendering, need your review.
The core problem seems to be in the transformToBufferedImage method.

image image

p.s.: tests are failing, I know it

@untainsYD untainsYD marked this pull request as draft August 31, 2025 19:49
@untainsYD
Copy link
Contributor Author

It is still cropping images and some tests failed, but some progress has been made. I will investigate further.

image image

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.

1 participant