Пример #1
0
 public void Encode(ImageBase image, Stream stream)
 {
     JpegEncoderCore encode = new JpegEncoderCore();
     if (subsampleSet){
         encode.Encode(image, stream, Quality, Subsample);
     } else{
         encode.Encode(image, stream, Quality, Quality >= 80 ? JpegSubsample.Ratio444 : JpegSubsample.Ratio420);
     }
 }
Пример #2
0
        public void Encode(ImageBase image, Stream stream)
        {
            JpegEncoderCore encode = new JpegEncoderCore();

            if (subsampleSet)
            {
                encode.Encode(image, stream, Quality, Subsample);
            }
            else
            {
                encode.Encode(image, stream, Quality, Quality >= 80 ? JpegSubsample.Ratio444 : JpegSubsample.Ratio420);
            }
        }