How to reduce the size of an image in C# and .NET 3.5?

后端 未结 7 1535
忘掉有多难
忘掉有多难 2020-12-05 16:10

I have a screen shot I take in my mobile app. The screen shot takes about 32 KB when saved as a png on a disk.

I am sending these to a central SQL Server and 32 KB

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 16:37

    Firing up Fireworks with a photo, which won't be the same but should give an idea

    66% quality JPG with no smoothing is 17.5k
    PNG8 with 256 colours is 58K (down to 42 using websnap palette)
    PNG8 with black and white palette is 14k
    

    Note that many image files will be smaller with a screen shot since there are large contiguous groupings of the same colour, and that may be especially true with black and white. It will probably also depend on the algorithm used to convert the image, but you may want to just go with whatever you can find...

提交回复
热议问题