If you have coincident transparent (or even partially transparent) areas in the layers, you will see white:
- with the PNG image, when it is displayed over a white background.
- with the JPG image, about all the time since transparent areas are filled with the default background color (usually white) before export.
These small areas can be hard to notice in Gimp if they are smaller than the squares of the checkerboard used to show transparency.
You can use a temporary bottom layer filled with a contrasting color to locate them in Gimp before exporting (make the bottom layer invisible before export).
Fixing them depends on how you created your image. If they are at the edge of things, they are likely anti-aliasing pixels. If you colored stuff by using plain bucket-fill (or a plain color or wand selection followed by a bucket-fill), then this is the reason, because these pixels are too different from their neighbors to be included. If this is the case, state so in the comment and I'll add the proper technique to this answer.
When you have colored areas on transparency the pixels on the edges are partially transparent. This is what make the edges look smooth (this is called 'anti-aliasing'). These pixels are not selected by the wand tool or the bucket-fill, and so are not painted by default. There are two techniques to know:
- If you want to paint the colored pixels themselves, just set the "alpha-lock" on the layer (this is the checkerboard icon at the top of the Layers list). When this is done, the (partial) transparency of the pixels is kept, so you can just paint over the pixels (brush, bucket-fill...) and the edges will be magically preserved. If you need to have a selection, make sure that the edge pixels are included in the selection.
- If you want to fill the transparent background, set the Paint tool to
Behind mode (
Mode selector in the Tool options of paint tools), then paint over the layer: transparent pixels will get the new color, partially transparent pixels on the edges will be complemented with the new color (so you keep the smooth edges) and opaque pixels remain unchanged.If you need a selection, make sure it includes the edge pixels (often done with
Select>Grow if the selection stoprs just before them).