High quality JPEG compression with c#

后端 未结 6 2004
谎友^
谎友^ 2020-11-27 05:32

I am using C# and want to save images using JPEG format. However .NET reduces quality of the images and saves them with compression that is not enough.

I want to sav

6条回答
  •  [愿得一人]
    2020-11-27 05:58

    Regarding the setup of the compression level in .NET, please check this link (everything included): http://msdn.microsoft.com/en-us/library/bb882583.aspx

    Rearding your question: Usually you will save the uploaded image from users as PNG, then you use this PNG as base to generate your JPGs with different sizes (and you put a watermark ONLY on the JPGs, never on the original PNG!) Advantage of this is: if you change your images-dimensions later on for your platform, you have the original PNG saved and based on this you can re-compute any new image sizes.

提交回复
热议问题