Skip to content
Blog

Why a transparent PNG gets a white or black background in JPEG

A logo can blend into any page as a PNG. Export it to JPEG and the space around it becomes a fixed rectangle.

One logo on two backgrounds

PNG can store partial opacity along an edge. JPEG needs a colour at every pixel. Look at the same translucent circle over white and navy. Its colour in the JPEG depends on what was underneath at export time.

Choose the background before export

  1. Open the original PNG in a layer editor such as GIMP. Create a solid layer the size of the image and move it below the artwork.
  2. For a product listing, use the required background colour. For a coloured page, enter its exact colour value and check the edges at 100%. Export a separate JPEG and open it on the intended page. Keep a transparent PNG for use on both light and dark layouts.

A pale outline or a baked-in checkerboard

Switch the layer below the artwork between black and white. A pale rim that stays around letters may be pixels left over from an earlier white background. Re-export from the original design if possible.

If the checks stay visible on both backgrounds, you may have a screenshot of the preview. Ask for the original PNG. Saving an already flattened JPEG as PNG can't recover the missing transparency.

Sources