Ejemplo n.º 1
0
 public JpegEncoder(DecodedJpeg decodedJpeg, int quality, Stream outStream)
 {
     this._input = decodedJpeg;
     this._input.Image.ChangeColorSpace(ColorSpace.YCbCr);
     this._quality = quality;
     this._height = this._input.Image.Height;
     this._width = this._input.Image.Width;
     this._outStream = outStream;
     this._dct = new DCT(this._quality);
     this._huf = new HuffmanTable(null);
 }
Ejemplo n.º 2
0
 public JpegComponent(JpegScan parentScan, byte id, byte factorHorizontal, byte factorVertical, byte quantizationID, byte colorMode)
 {
     this.parent = parentScan;
     if (colorMode == JPEGFrame.JPEG_COLOR_YCbCr)
     {
         if (id == 1)
         {
             this.ACTable = new HuffmanTable(JpegHuffmanTable.StdACLuminance);
             this.DCTable = new HuffmanTable(JpegHuffmanTable.StdDCLuminance);
         }
         else
         {
             this.ACTable = new HuffmanTable(JpegHuffmanTable.StdACChrominance);
             this.DCTable = new HuffmanTable(JpegHuffmanTable.StdACLuminance);
         }
     }
     this.component_id = id;
     this.factorH = factorHorizontal;
     this.factorV = factorVertical;
     this.quant_id = quantizationID;
 }
Ejemplo n.º 3
0
 public void setDCTable(JpegHuffmanTable table)
 {
     this.DCTable = new HuffmanTable(table);
 }