diff --git a/cmd/d2/main.go b/cmd/d2/main.go index ae4d3f421..b21467b9e 100644 --- a/cmd/d2/main.go +++ b/cmd/d2/main.go @@ -186,7 +186,7 @@ func compile(ctx context.Context, ms *xmain.State, plugin d2plugin.Plugin, input } if filepath.Ext(outputPath) == ".png" { - outputImage, err = png.ExportPNG(ms, page, svg) + outputImage, err = png.ExportPNG(ms, page, outputImage) if err != nil { return nil, err }