Grayscale Morphology
Dilate, erode, open or close bright grayscale structures using a square neighborhood.
Drop your image here
Drag and drop, or choose a file below
JPG · PNG · WEBP
Up to 250 MB · One image at a time
Each image: up to 16 megapixels and 8192 px per side
Radius r gives a (2r+1)×(2r+1) square. Opening removes small bright features and closing fills small dark gaps. The output is grayscale, not a color-preserving retouch. Transparency is treated as black when filtering; faint semitransparent shapes can darken.
Original
Choose an image or try the sample to see your preview here.
100% local processing
How to use
- 01
Choose an image or try the local sample.
- 02
Use a grayscale mask or high-contrast scan; choose the operation and start with radius 1 px before increasing it.
- 03
Review the result and download the file.
Details and tips
How it works
Converts sRGB luma over black to grayscale, then uses sliding maximum/minimum filters in linear time. Dilation expands bright regions; erosion shrinks them. Opening is erosion followed by dilation; closing reverses that order. Original alpha is retained; image borders are clamped.
Made for everyday images
Clean binary-mask specks, separate touching bright marks, fill small gaps and compare shape structure before further image analysis.
Frequently asked questions
Are images uploaded?
No. Processing, previews and downloads stay on your device.
What are the limits?
JPG, PNG and WebP, up to 250 MB, 8192 pixels per side and 16 million pixels. Expanded output must also fit these limits. Animation uses one still frame.