How can I get better results when shrinking an image

前端 未结 3 812
礼貌的吻别
礼貌的吻别 2020-12-16 19:26

I\'m scaling images down in c#, and I\'ve compared my methods with the best method in Photoshop cs5 and cannot replicate it.

In PS i\'m using bicubic sharper, which

3条回答
  •  不思量自难忘°
    2020-12-16 19:35

    I stumbled upon this question.

    I used this code to use no compression of the jpeg and it comes out like the PS version:

    ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders(); 
        ImageCodecInfo ici = null; 
        foreach (ImageCodecInfo codec in codecs)
        { 
            if (codec.MimeType == "image/jpeg") 
                ici = codec; 
        } 
    
        EncoderParameters ep = new EncoderParameters(); 
        ep.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, (long)100);
    

提交回复
热议问题