C# Simple Image Resize : File Size Not Shrinking

后端 未结 6 965
夕颜
夕颜 2021-01-03 08:39

I have a question in regards to the code below. The code I have below successfully runs through a directory, and sets the resoultion of the picture to a smaller size. Howe

6条回答
  •  遥遥无期
    2021-01-03 09:44

    Interesting implementation detail: flip the image twice, and it will cause the thumbnail to be thrown out and this will decrease the file size.

    result.RotateFlip(System.Drawing.RotateFlipType.Rotate180FlipNone); result.RotateFlip(System.Drawing.RotateFlipType.Rotate180FlipNone);

提交回复
热议问题