Paint.NET Flatten Image: Transparent Pixels Explained

Flattening an image in Paint.NET consolidates all visible layers into a single, unified layer, but how transparent pixels behave depends on what lies beneath them. During the flattening process, Paint.NET uses standard alpha compositing to calculate pixel values from top to bottom. Transparent pixels either allow lower layer content to show through, blend with semi-transparent pixels, or remain fully transparent if no underlying color exists.

How Layer Hierarchy Affects Transparency

When you trigger the flatten command (Image > Flatten or Ctrl + Shift + F), Paint.NET merges layers starting from the bottom of the layer stack to the top:

  • Transparent pixels over opaque pixels: If a transparent pixel on an upper layer sits above an opaque pixel on a lower layer, the lower layer's pixel is preserved completely.
  • Semi-transparent pixels: If a pixel has partial transparency (an alpha value between 1 and 254), its color mathematically blends with the color directly beneath it.
  • Transparent pixels over transparent pixels: If an area is fully transparent across every single visible layer, that area remains completely transparent after flattening. Paint.NET does not automatically fill empty transparent space with white or black during the internal flatten operation.

The Role of Hidden Layers

Any layer that has its visibility checkbox unchecked is completely discarded when flattening. If an opaque layer is hidden underneath a transparent layer, Paint.NET ignores the hidden layer entirely, leaving the resulting flattened area transparent.

Editor View vs. Exporting File Formats

After flattening, your document becomes a single layer named "Background," but the transparent checkerboard pattern will still be visible anywhere transparency was preserved.

What happens next depends on the file format you use when saving:

  • PNG, TIFF, and GIF: These formats support transparency. The transparent pixels will remain transparent in the exported file.
  • JPEG and BMP: These formats do not support alpha channels. When saving a flattened image with transparent pixels to JPEG or BMP, Paint.NET converts all remaining transparent pixels into solid white pixels by default.