home *** CD-ROM | disk | FTP | other *** search
/ Compressed Image File Formats / CompressedImageFileFormatsJohnMiano.iso / pc / Examples / c10 / inc / jpenquan.h < prev   
Encoding:
C/C++ Source or Header  |  1998-12-17  |  1.5 KB  |  62 lines

  1. #ifndef __JPENQUAN_H
  2. #define __JPENQUAN_H
  3. //
  4. // Copyright (c) 1997,1998 Colosseum Builders, Inc.
  5. // All rights reserved.
  6. //
  7. // Colosseum Builders, Inc. makes no warranty, expressed or implied
  8. // with regards to this software. It is provided as is.
  9. //
  10. // See the README.TXT file that came with this software for restrictions
  11. // on the use and redistribution of this file or send E-mail to
  12. // info@colosseumbuilders.com
  13. //
  14.  
  15. //
  16. //  Title:  JpegEncoderQuantizationTable class definition
  17. //
  18. //  Author:  John M. Miano  miano@colosseumbuilders.com
  19. //
  20. //  Description:
  21. //
  22. //    This class represents quantization table in the JPEG encoder.
  23. //
  24.  
  25. #include "jpeg.h"
  26. class JpegDecoder ;
  27.  
  28. class JpegEncoderQuantizationTable
  29. {
  30. public:
  31.   JpegEncoderQuantizationTable() ;
  32.   ~JpegEncoderQuantizationTable() {}
  33.  
  34.   UBYTE2 operator[](unsigned int index) const ;
  35.   UBYTE2 &operator[](unsigned int index) ;
  36.  
  37.   void BuildScaledTables () ;
  38.  
  39. private:
  40.   JpegEncoderQuantizationTable (const JpegEncoderQuantizationTable&) ;
  41.   JpegEncoderQuantizationTable &operator=(const JpegEncoderQuantizationTable&) ;
  42.  
  43.   UBYTE2 data_values [JpegSampleSize] ;
  44.   double float_scaling [JpegSampleWidth][JpegSampleWidth] ;
  45.  
  46.   friend class JpegEncoderDataUnit ;
  47. } ;
  48.  
  49. inline UBYTE2 JpegEncoderQuantizationTable::operator[](unsigned int index) const
  50. {
  51.   return data_values [index] ;
  52. }
  53.  
  54. inline UBYTE2 &JpegEncoderQuantizationTable::operator[](unsigned int index)
  55. {
  56.   return data_values [index] ;
  57. }
  58.  
  59.  
  60.  
  61. #endif
  62.