Seems like your pipeline goes though some lossy format like JPG. This results in bad quality png output.