J2kClass.h
上传用户:xin6688482
上传日期:2013-09-07
资源大小:276k
文件大小:1k
源码类别:

图形图像处理

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #ifndef Jpeg2000H
  3. #define Jpeg2000H
  4. #define WIN32
  5. #include <vcl.h>
  6. #include <math.h>
  7. #include "J2k.h"
  8. #include <Graphics.hpp>
  9. class TJ2kCoder
  10. {
  11. public:
  12.         //CompressionRate:压缩倍数
  13.         bool Encode( Graphics::TBitmap *Bitmap, TMemoryStream *mStm ,double CompressionRate = 10.0 );
  14. bool Decode( TMemoryStream *mStm, Graphics::TBitmap *Bitmap );
  15. protected:
  16. void j2k_calc_explicit_stepsizes(j2k_tccp_t *tccp, int prec);
  17. void j2k_encode_stepsize(int stepsize, int numbps, int *expn, int *mant);
  18. int  j2k_floorlog2( int a );
  19. };
  20. //---------------------------------------------------------------------------
  21. #endif