예제 #1
0
        public JpegComponent(JpegScan parentScan, byte id, byte factorHorizontal, byte factorVertical,
                             byte quantizationID, byte colorMode)
        {
            parent = parentScan;

            /* Set default tables in case they're not provided.  J. Powers */
            // TODO: only gen if needed

            if (colorMode == JPEGFrame.JPEG_COLOR_YCbCr)
            {
                if (id == 1) // Luminance
                {
                    ACTable = new HuffmanTable(JpegHuffmanTable.StdACLuminance);
                    DCTable = new HuffmanTable(JpegHuffmanTable.StdDCLuminance);
                }
                else
                {
                    ACTable = new HuffmanTable( JpegHuffmanTable.StdACChrominance);
                    DCTable = new HuffmanTable( JpegHuffmanTable.StdACLuminance);
                }
            }

            component_id = id;

            factorH = factorHorizontal;
            factorV = factorVertical;

            quant_id = quantizationID;
        }
예제 #2
0
        public JpegComponent(JpegScan parentScan, byte id, byte factorHorizontal, byte factorVertical,
                             byte quantizationID, byte colorMode)
        {
            parent = parentScan;

            /* Set default tables in case they're not provided.  J. Powers */
            // TODO: only gen if needed

            if (colorMode == JPEGFrame.JPEG_COLOR_YCbCr)
            {
                if (id == 1) // Luminance
                {
                    ACTable = new HuffmanTable(JpegHuffmanTable.StdACLuminance);
                    DCTable = new HuffmanTable(JpegHuffmanTable.StdDCLuminance);
                }
                else
                {
                    ACTable = new HuffmanTable(JpegHuffmanTable.StdACChrominance);
                    DCTable = new HuffmanTable(JpegHuffmanTable.StdACLuminance);
                }
            }

            component_id = id;

            factorH = factorHorizontal;
            factorV = factorVertical;

            quant_id = quantizationID;
        }
예제 #3
0
 public JpegComponent(JpegScan parentScan, byte id, byte factorHorizontal, byte factorVertical, byte quantizationID, byte colorMode)
 {
     parent = parentScan;
     if (colorMode == JPEGFrame.JPEG_COLOR_YCbCr)
     {
         if (id == 1)
         {
             ACTable = new HuffmanTable(JpegHuffmanTable.StdACLuminance);
             DCTable = new HuffmanTable(JpegHuffmanTable.StdDCLuminance);
         }
         else
         {
             ACTable = new HuffmanTable(JpegHuffmanTable.StdACChrominance);
             DCTable = new HuffmanTable(JpegHuffmanTable.StdACLuminance);
         }
     }
     component_id = id;
     factorH      = factorHorizontal;
     factorV      = factorVertical;
     quant_id     = quantizationID;
 }
예제 #4
0
파일: JpegComponent.cs 프로젝트: JuRogn/OA
 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;
 }