gg icon indicating copy to clipboard operation
gg copied to clipboard

Reducing the file size

Open sahilpaudel-pe opened this issue 5 years ago • 4 comments

dc.SavePNG("out.png")

Won't this degrade the quality of the image?

sahilpaudel-pe avatar Sep 08 '20 10:09 sahilpaudel-pe

PNG is usually a lossless file format. It stores the image as zipped data.

Jpeg on the other hand is a lossy file format. And thus degrades image quality.

kirides avatar Jan 05 '21 10:01 kirides

I think png can actually be recompressed, because the pictures we draw are actually 32-bit, but we can convert them to 8-bit images such as websites like tinypng

achims1 avatar Mar 13 '22 14:03 achims1

Reducing the bits is a lossy operation if there are more than 8Bits of color.

Many Websites use slightly lossy compression algorithm by cleaning up some neighbouring pixels. Pngout for example features such things iirc.

kirides avatar Mar 13 '22 14:03 kirides

I have done some methods to compress the image without changing the size, but the time is too long, so do you know other third-party packages that can solve this problem?

achims1 avatar Mar 13 '22 15:03 achims1