You can access the tool at: https://yutingzhang.github.io/doc-bg-remover/
This tool allows you to upload (or drag-and-drop) an image or PDF file, then modify the background, transparency, gamma, and other settings. It can convert images (or the first page of a PDF) to either grayscale or preserve original colors, optionally applying a binarization process, adjusting a white scale threshold, or controlling transparency.
Features
- Image/PDF Upload
- Supports JPG, PNG, or PDF (first page only).
- File selection or drag-and-drop.
- PDF Render DPI
- For PDF input only, you can specify a DPI (dots per inch) value from 72 to 600.
- Preset buttons (72, 150, 300, 600) for quick selection.
- Automatically re-renders the PDF at the specified resolution.
- Binarization
- Optional black/white conversion based on a threshold slider (0–255).
- If binarized, images become strictly black and white (with optional transparent background).
- White Scale & Gamma Correction (if not binarizing)
- White Scale (0–255): A linear pre-gamma adjustment to push off-white pixels closer to full white. cnew=min(ct×255,255)c_{\text{new}} = \min\bigl(\tfrac{c}{t} \times 255, 255\bigr)cnew=min(tc×255,255) where ttt is the selected scale, and ccc is the grayscale value.
- Gamma Correction (0.1–3.0): Post-scaling gamma to brighten/darken midtones.
- Background Options
- Transparent: For grayscale modes, black pixels are fully opaque and white is fully transparent.
- White: Produces a fully opaque PNG with white or black/colored areas, no transparency channel.
- Output Types
- Grayscale: Convert everything to grayscale (with optional transparency if background is transparent).
- Preserve Colors: Keep original colors and only adjust transparency or produce a fully opaque white background.
- Download Result
- After applying all settings, you can preview the final PNG and download it.