1) The key: alpha channel
True transparency requires a per‑pixel alpha channel. Without alpha, edges are pre‑blended with a fixed matte color, which causes visible halos on different backgrounds.
2) Formats that support transparency
- PNG (lossless): perfect transparency and crisp edges. Ideal for UI, logos, icons, and screenshots with text. Heavier for photos.
- WebP: supports alpha in lossy and lossless modes. Great size/quality ratio. Validate anti‑aliasing on thin edges.
- AVIF: superior compression with alpha support. Review gradients and soft transitions; encoding may be slower.
- SVG: vector, scalable, transparent via shapes/attributes. Perfect for pure graphics and logos.
3) Formats that don’t work
- JPEG: no alpha. Exporting over white/black creates fringing when overlaid.
- GIF: binary transparency (on/off). Jagged edges on diagonals. Avoid except for retro cases.
4) Avoid halos: matte and premultiplied alpha
If the original cutout had a white background and you exported PNG with a white matte, you’ll see halos on dark backgrounds. Export without matte and with true alpha. Test edges on both light and dark backgrounds.
5) PNG, WebP or AVIF?
- Flat UI/logos: PNG or WebP lossless (pick the smallest that remains crisp).
- Cut‑out photos: WebP/AVIF with alpha often offers the best balance.
- Vector: SVG whenever possible.
6) Recommended flow with Orqui
- Remove the background (threshold + feather).
- Convert to WebP/PNG as needed.
- Optimize tuning quality and comparing.
7) Quality checklist
- No halos on both light and dark backgrounds.
- Dimensions fit actual usage (no over‑sizing).
- Alpha‑capable format (PNG/WebP/AVIF) or SVG when applicable.
- Reasonable weight for the page (use compression).