Skip to content
Intera Tools

File Formats

PNG Transparency Explained: Alpha Channels, JPG Backgrounds and Edge Halos

A transparent PNG is not an image with a missing background. Every pixel carries an extra value that says how opaque it is, and that value is what makes soft edges, shadows and see-through logos possible. This guide explains how the different kinds of PNG transparency work, what happens when a format without transparency gets involved, and how to keep edges clean when you resize, compress or convert.

Intera Tools5 min read

Key points

  • Most transparent PNGs use an 8-bit alpha channel: 256 levels from fully transparent (0) to fully opaque (255) for every pixel.
  • JPG has no alpha channel. Converting to JPG always fills transparent areas with a solid color, which you can choose in Intera Tools.
  • Soft edges are partly transparent. Flattening them onto one color and then placing the image on another color leaves a visible halo.
  • PNG compression in Intera Tools reduces the image to a palette of at most 256 colors but keeps transparency, including semi-transparent edges.
  • WebP also supports transparency and is often much smaller than PNG, but it is not accepted everywhere.

How a PNG stores transparency

A normal color pixel has three values: red, green and blue. A PNG with an alpha channel adds a fourth value, alpha, which records how opaque the pixel is. That is why you see the term RGBA. In the common 8-bit version, alpha ranges from 0 to 255: 0 means the pixel is completely invisible, 255 means it fully covers whatever is behind it, and everything in between blends with the background. A pixel at alpha 128 shows roughly half of its own color and half of the background.

This is what makes a drop shadow fade out, or lets the anti-aliased edge of a round logo look smooth on any background. PNG also allows 16 bits per channel, which gives 65,536 alpha levels, but browsers work with 8 bits per channel, so a 16-bit PNG that passes through a browser-based tool is saved back as an 8-bit PNG.

According to the PNG specification, color values are stored unpremultiplied ("straight" alpha): a pixel keeps its full color even when it is almost transparent. Browsers usually work with premultiplied values internally. The practical effect is small: when an image is re-saved, the hidden color of fully transparent pixels is lost and very faint pixels can shift by a step or two. You will not see this in normal use.

The other kinds of PNG transparency

PNG typeHow transparency is storedSoft edges?
Truecolor with alpha (RGBA)A full alpha value for every pixelYes
Grayscale with alphaGray value plus alpha for every pixelYes
Indexed (palette, often called PNG-8)Up to 256 colors; a tRNS chunk gives each palette entry its own alpha valueYes, if the palette contains semi-transparent entries
Truecolor or grayscale without alphaOptional tRNS chunk marks one exact color as fully transparentNo, pixels are either visible or invisible
PNG color types and how they handle transparency

The palette type matters because it is how small transparent PNGs are made. Instead of storing four values per pixel, the file stores one small palette index per pixel plus a table of colors, and the tRNS table adds an alpha value to each color. A logo with a few flat colors and a smooth edge can fit comfortably into such a palette.

Why JPG can't be transparent

JPG stores only color (or grayscale) information. There is no alpha channel in the format, so there is no way to mark a pixel as see-through. When a transparent image is saved as JPG, every transparent or semi-transparent pixel has to be blended onto a solid color first. This is called flattening.

In Intera Tools, PNG to JPG, WebP to JPG and Convert Image with JPG as the target show a Background for transparent areas option. It is white by default, and you can pick any color. The other image tools keep the original format, so resizing, cropping, rotating or watermarking a PNG saves a PNG with its transparency intact.

Edge halos and fringes

Halos appear because edge pixels are partly transparent. Imagine a dark blue logo with a smooth edge. The outermost pixels might be dark blue at 30% opacity. If you flatten the logo onto white, those pixels become a pale blue-white mix. Place the resulting JPG on a dark website header and every edge now has a thin light outline, because the white is baked in.

The same thing happens in reverse: a logo flattened onto black looks dirty on a white page. Trying to remove the white afterwards with a "magic wand" or color-to-transparent tool rarely works, because the edge pixels are no longer pure white. They are a mix that the tool cannot separate cleanly.

  • Keep the original transparent PNG as your master copy and make other versions from it.
  • If you must flatten, choose a background color that matches where the image will appear. A logo for a dark navy banner should be flattened onto that navy, not white.
  • Check the result on both a light and a dark background before you publish it.

Making transparent PNGs smaller

PNG is lossless, so a large transparent image with photos or gradients can be several megabytes. When Compress Image processes a PNG, it reduces the image to an optimized palette, at most 256 colors, and saves an indexed PNG. The palette entries include alpha, so transparent areas and soft edges are kept. The Light, Balanced and Strong levels use 256, 160 and 64 colors, and you can set the exact number with PNG colors.

Fewer colors mostly affect smooth gradients and soft shadows, which can show visible steps (banding). Logos, icons and screenshots usually survive even strong reduction. If the compressed file would be larger than the original, Intera Tools keeps the original file instead.

WebP is the other option. It supports full alpha, and Google reports that lossy WebP with transparency is typically about three times smaller than the equivalent PNG. The catch is compatibility: some upload forms, older software and many print workflows still expect PNG or JPG. See WebP format explained for details.

Keeping a logo transparent

  1. 01

    Start from the transparent original

    Use the PNG (or SVG) from your designer or brand kit, not a screenshot or a JPG copy. A JPG version has already lost its transparency.

  2. 02

    Resize first

    Use Resize Image to make it the size you need, for example 600 px wide for an email signature. The output stays a PNG with transparency.

  3. 03

    Compress with care

    Run it through Compress Image on Light (256 colors). Zoom in on the edges. If they look stepped or a soft shadow shows bands, keep the uncompressed PNG.

  4. 04

    Test on two backgrounds

    Place the file on a white and a dark surface (a document, slide or web page). Clean edges on both mean the transparency is correct.

Making a white-background image for a marketplace

Large marketplaces such as Amazon ask for main product images on a pure white background (RGB 255, 255, 255), and a transparent PNG may be shown on whatever background the site happens to use. If your product is already cut out on a transparent background, flattening it onto white gives you a predictable result. Check your marketplace's current image guide for its exact rules.

  1. 01

    Open PNG to JPG

    Add your cut-out PNGs to PNG to JPG. You can add up to 100 at once.

  2. 02

    Keep the background white

    Leave Background for transparent areas at white (#ffffff). Set Quality high, around 90 or above, so the area right next to the product stays clean white.

  3. 03

    Need PNG instead?

    If the platform specifically requires PNG, convert the white-background JPG with JPG to PNG. The white background stays, but the file will be larger than the JPG.

6WorkflowE-commerce Image OptimizerPreparing a whole catalog? The online store image workflow resizes or pads every image to the same size on a background color, converts it, renames the files and gives you one ZIP.Open workflowToolPNG to JPGConvert transparent PNGs to JPG and choose the background color yourself. Everything runs in your browser.Open tool

Questions

Why does my transparent PNG show a black background in some apps?

The image is still transparent, but the app ignores the alpha channel. Transparent pixels often store black as their hidden color, so an app that skips alpha shows black. Open the file in a browser or a modern image viewer to check it, or flatten it onto the color you want before sending it to that app.

Does converting a PNG to JPG and back restore the transparency?

No. When the image is saved as JPG, transparent areas are filled with the background color and the alpha information is discarded. Converting the JPG back to PNG gives you a PNG with a solid background.

Does compressing a PNG remove transparency?

Not in Intera Tools. PNG compression reduces the number of colors, but each palette color keeps its own transparency value, so transparent and semi-transparent areas survive. Only output as JPG removes transparency.

Is PNG-8 good enough for a logo?

Often yes. Logos with a few flat colors and smooth edges fit well into a 256-color palette with transparency. Logos with gradients, glows or photographic elements may show banding, so compare the result with the original before replacing it.

Sources

  1. W3C – PNG Specification (Third Edition)
  2. Google for Developers – WebP transparency and size figures
  3. Amazon Seller Forums – Main image requirements (pure white background)

Related tools